|
| 1 | +# This example workflow represents an independent workflow that tests something, runs after E2E test Job is finished |
| 2 | +# and makes use of startJob machine's access information |
| 3 | + |
| 4 | +name: Podman E2E with Podman installation on Mac OS |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_call: |
| 8 | + secrets: |
| 9 | + env_vars: |
| 10 | + required: true |
| 11 | + |
| 12 | +jobs: |
| 13 | + podman-e2e: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + version: ['13','14'] |
| 19 | + arch: ['m1', 'm2'] |
| 20 | + qenvs-version: ['v0.6.1'] |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: Decode credentials as environment variables |
| 24 | + env: |
| 25 | + env_vars: ${{ secrets.env_vars }} |
| 26 | + run: | |
| 27 | + for i in $env_vars; do |
| 28 | + i=$(echo $i | sed 's/=.*//g')=$(echo ${i#*=} | base64 -di | base64 -di) |
| 29 | + echo ::add-mask::${i#*=} |
| 30 | + printf '%s\n' "$i" >> $GITHUB_ENV |
| 31 | + done |
| 32 | +
|
| 33 | + - name: Validate credentials |
| 34 | + run: | |
| 35 | + # Secrets are now available as masked environment variable. |
| 36 | + echo $HOST_D # or ${{ env.HOST_ID }} |
| 37 | +
|
| 38 | + - name: Create instance on the host passing --host-id |
| 39 | + run: | |
| 40 | + # # Create instance with provided HOST_ID |
| 41 | + # podman run -d --name mac-create --rm \ |
| 42 | + # -v ${PWD}:/workspace:z \ |
| 43 | + # -e AWS_ACCESS_KEY_ID=${{ AWS_ACCESS_KEY_ID }} \ |
| 44 | + # -e AWS_SECRET_ACCESS_KEY='${{ AWS_SECRET_ACCESS_KEY }}' \ |
| 45 | + # -e AWS_DEFAULT_REGION=us-east-1 \ |
| 46 | + # quay.io/rhqp/qenvs:${{ matrix.qenvs-version }} aws \ |
| 47 | + # mac create \ |
| 48 | + # --host-id ${{ env.HOST_ID }} |
| 49 | + # --project-name mac-desktop \ |
| 50 | + # --backed-url file:///workspace \ |
| 51 | + # --conn-details-output /workspace \ |
| 52 | + # --version '${{ matrix.version }}' \ |
| 53 | + # --arch '${{ matrix.arch }}' |
| 54 | + # # Check logs |
| 55 | + # podman logs -f mac-create |
| 56 | + echo "Passing ${{ env.HOST_ID }} info" |
| 57 | +
|
| 58 | + # - name: Check instance system info |
| 59 | + # run: | |
| 60 | + # ssh -i id_rsa \ |
| 61 | + # -o StrictHostKeyChecking=no \ |
| 62 | + # -o UserKnownHostsFile=/dev/null \ |
| 63 | + # -o ServerAliveInterval=30 \ |
| 64 | + # -o ServerAliveCountMax=1200 \ |
| 65 | + # $(cat username)@$(cat host) "systeminfo" |
| 66 | + |
| 67 | + # - name: Emulate X session |
| 68 | + # run: | |
| 69 | + # # use fake rdp to emulate an active x session |
| 70 | + # podman run -d --name x-session \ |
| 71 | + # -e RDP_HOST=$(cat host) \ |
| 72 | + # -e RDP_USER=$(cat username) \ |
| 73 | + # -e RDP_PASSWORD=$(cat userpassword) \ |
| 74 | + # quay.io/rhqp/frdp:v0.0.1 |
| 75 | + # # Wait until the x session has been created |
| 76 | + # podman wait --condition running x-session |
| 77 | + # # Check logs for the x session |
| 78 | + # podman logs x-session |
| 79 | + |
| 80 | + # - name: Run podman desktop e2e |
| 81 | + # run: | |
| 82 | + # # Get latest built |
| 83 | + # tag=$(curl --silent https://api.github.com/repos/containers/podman-desktop/releases | jq -r 'map(select(.prerelease)) | first | .tag_name') |
| 84 | + # # Run e2e tests |
| 85 | + # podman run --rm -d --name pd-e2e-mac \ |
| 86 | + # -e TARGET_HOST=$(cat host) \ |
| 87 | + # -e TARGET_HOST_USERNAME=$(cat username) \ |
| 88 | + # -e TARGET_HOST_KEY_PATH=/data/id_rsa \ |
| 89 | + # -e TARGET_FOLDER=pd-e2e \ |
| 90 | + # -e TARGET_RESULTS=podman-desktop-e2e-results-${tag}.xml \ |
| 91 | + # -e OUTPUT_FOLDER=/data \ |
| 92 | + # -e DEBUG=true \ |
| 93 | + # -v $PWD:/data:z \ |
| 94 | + # quay.io/rhqp/podman-desktop-e2e:v1.1.0-windows-amd64 \ |
| 95 | + # pd-e2e/run.ps1 \ |
| 96 | + # -wslInstallFix 'false' \ |
| 97 | + # -targetFolder pd-e2e \ |
| 98 | + # -pdUrl "https://github.com/containers/podman-desktop/releases/download/${tag}/podman-desktop-${tag:1}.exe" \ |
| 99 | + # -junitResultsFilename podman-desktop-e2e-results-${tag}.xml |
| 100 | + # # Check logs |
| 101 | + # podman logs -f pd-e2e-mac |
| 102 | + |
| 103 | + - name: Destroy instance |
| 104 | + if: always() |
| 105 | + run: | |
| 106 | + # # Destroy instance |
| 107 | + # podman run -d --name mac-destroy --rm \ |
| 108 | + # -v ${PWD}:/workspace:z \ |
| 109 | + # -e AWS_ACCESS_KEY_ID=${{ AWS_ACCESS_KEY_ID }} \ |
| 110 | + # -e AWS_SECRET_ACCESS_KEY='${{ AWS_SECRET_ACCESS_KEY }}' \ |
| 111 | + # -e AWS_DEFAULT_REGION=us-east-1 \ |
| 112 | + # quay.io/rhqp/qenvs:${{ matrix.qenvs-version }} aws \ |
| 113 | + # mac destroy \ |
| 114 | + # --host-id ${{ env.HOST_ID }} |
| 115 | + # --project-name mac-desktop \ |
| 116 | + # --backed-url 'file:///workspace' |
| 117 | + # # Check logs |
| 118 | + # podman logs -f mac-destroy |
| 119 | + echo "Destroying instance with ${{ env.HOST_ID }}" |
| 120 | +
|
| 121 | + # - name: Publish Test Report |
| 122 | + # uses: mikepenz/action-junit-report@v4 |
| 123 | + # if: always() # always run even if the previous step fails |
| 124 | + # with: |
| 125 | + # fail_on_failure: true |
| 126 | + # include_passed: true |
| 127 | + # detailed_summary: true |
| 128 | + # require_tests: true |
| 129 | + # report_paths: '**/*results*.xml' |
| 130 | + |
| 131 | + # - name: Upload e2e test artifacts |
| 132 | + # uses: actions/upload-artifact@v4 |
| 133 | + # if: always() |
| 134 | + # with: |
| 135 | + # name: E2E-results-mac-${{ matrix.version }}${{ matrix.arch }} |
| 136 | + # path: | |
| 137 | + # podman-e2e-results-*.xml |
| 138 | + # podman-desktop-e2e-results-*.xml |
| 139 | + |
| 140 | + |
| 141 | + |
0 commit comments