From 22cc420518d439bb4af8356cfb2ca66816abc459 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Tue, 9 Jan 2024 14:08:09 -0500 Subject: [PATCH] test syntax --- .github/workflows/all.yml | 131 ++++++++++++++++++++-------------- .github/workflows/builder.yml | 10 +-- .github/workflows/tester.yml | 13 ++++ 3 files changed, 96 insertions(+), 58 deletions(-) diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 1887864..543bd2f 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -8,6 +8,7 @@ on: env: OCI_E2E_NAME: libhvee-e2e + CORRELATE: ${{ github.sha }} jobs: build-oci-e2e: @@ -22,13 +23,13 @@ jobs: - name: Build and archive e2e image # use github.sha as ID to correlate various workflows triggered by the same event run: | - VERSION=${{ github.sha }} make build-oci-e2e - podman save -o ${{ env.OCI_E2E_NAME }}.tar quay.io/rhqp/${{ env.OCI_E2E_NAME}}:v${{ github.sha }} + VERSION=${{ env.CORRELATE }} make build-oci-e2e + podman save -o ${{ env.OCI_E2E_NAME }}.tar quay.io/rhqp/${{ env.OCI_E2E_NAME}}:v${{ env.CORRELATE }} - name: Upload e2e flat image as artifact uses: actions/upload-artifact@v3 with: - name: ${{ env.OCI_E2E_NAME }}-v${{ github.sha }} + name: ${{ env.OCI_E2E_NAME }}-v${{ env.CORRELATE }} path: ${{ env.OCI_E2E_NAME }}.tar build-executables: @@ -51,7 +52,7 @@ jobs: - name: Upload libhvee executables as artifact uses: actions/upload-artifact@v3 with: - name: libhvee-v${{ github.sha }} + name: libhvee-v${{ env.CORRELATE }} path: bin/*.exe e2e-windows-destkop: @@ -75,55 +76,79 @@ jobs: steps: # When moving to be executed on upstream we need to save the context # to try match the ${{ github.sha }} or some other correlation value - - name: Create instance - run: | - # Create instance - podman run -d --name windows-create --rm \ - -v ${PWD}:/workspace:z \ - -e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \ - -e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \ - -e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \ - -e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \ - -e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \ - -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \ - quay.io/rhqp/qenvs:v0.6.1 azure \ - windows create \ - --project-name 'windows-desktop' \ - --backed-url azblob://qenvs-state/${{ github.sha }} \ - --conn-details-output '/workspace' \ - --windows-version '${{ matrix.windows-version }}' \ - --windows-featurepack '${{ matrix.windows-featurepack }}' \ - --tags org=containers,project=libhvee,origin=ghaction \ - --spot - # Check logs - podman logs -f windows-create - - - name: Check instance system info - run: | - ssh -i id_rsa \ - -o StrictHostKeyChecking=no \ - -o UserKnownHostsFile=/dev/null \ - -o ServerAliveInterval=30 \ - -o ServerAliveCountMax=1200 \ - $(cat username)@$(cat host) "systeminfo" - - - name: Destroy instance - if: always() + # - name: Create instance + # run: | + # # Create instance + # podman run -d --name windows-create --rm \ + # -v ${PWD}:/workspace:z \ + # -e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \ + # -e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \ + # -e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \ + # -e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \ + # -e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \ + # -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \ + # quay.io/rhqp/qenvs:v0.6.1 azure \ + # windows create \ + # --project-name 'windows-desktop' \ + # --backed-url azblob://qenvs-state/${{ github.sha }} \ + # --conn-details-output '/workspace' \ + # --windows-version '${{ matrix.windows-version }}' \ + # --windows-featurepack '${{ matrix.windows-featurepack }}' \ + # --tags org=containers,project=libhvee,origin=ghaction \ + # --spot + # # Check logs + # podman logs -f windows-create + + # - name: Check instance system info + # run: | + # ssh -i id_rsa \ + # -o StrictHostKeyChecking=no \ + # -o UserKnownHostsFile=/dev/null \ + # -o ServerAliveInterval=30 \ + # -o ServerAliveCountMax=1200 \ + # $(cat username)@$(cat host) "systeminfo" + + - name: Download e2e flat image as artifact + id: download-libhvee-e2e + uses: dawidd6/action-download-artifact@v3 + with: + name: libhvee-e2e-v${{ env.CORRELATE }} + # workflow: all.yml + # workflow_conclusion: "" + + - name: Download libhvee executables + id: download-libhvee + uses: dawidd6/action-download-artifact@v3 + with: + path: . + name: libhvee-v${{ env.CORRELATE }} + # workflow: all.yml + # workflow_conclusion: "" + + - name: Run libhvee e2e run: | - # Destroy instance - podman run -d --name windows-destroy --rm \ - -v ${PWD}:/workspace:z \ - -e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \ - -e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \ - -e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \ - -e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \ - -e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \ - -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \ - quay.io/rhqp/qenvs:v0.6.1 azure \ - windows destroy \ - --project-name 'windows-desktop' \ - --backed-url azblob://qenvs-state/${{ github.sha }} - # Check logs - podman logs -f windows-destroy + # load libhvee-e2e image from tar file + # podman load -i libhvee-e2e.tar + ls + # podman images + + # - name: Destroy instance + # if: always() + # run: | + # # Destroy instance + # podman run -d --name windows-destroy --rm \ + # -v ${PWD}:/workspace:z \ + # -e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \ + # -e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \ + # -e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \ + # -e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \ + # -e AZURE_STORAGE_ACCOUNT='${{ secrets.AZURE_STORAGE_ACCOUNT }}' \ + # -e AZURE_STORAGE_KEY='${{ secrets.AZURE_STORAGE_KEY }}' \ + # quay.io/rhqp/qenvs:v0.6.1 azure \ + # windows destroy \ + # --project-name 'windows-desktop' \ + # --backed-url azblob://qenvs-state/${{ github.sha }} + # # Check logs + # podman logs -f windows-destroy \ No newline at end of file diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 5952d98..3233349 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -1,10 +1,10 @@ name: builder -on: - push: - branches: - - "main" - pull_request: {} +# on: +# push: +# branches: +# - "main" +# pull_request: {} env: OCI_E2E_NAME: libhvee-e2e diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml index 7e5e2de..1e2687a 100644 --- a/.github/workflows/tester.yml +++ b/.github/workflows/tester.yml @@ -62,6 +62,19 @@ jobs: -o ServerAliveCountMax=1200 \ $(cat username)@$(cat host) "systeminfo" + - name: Download e2e flat image as artifact + id: download-images-artifact + uses: dawidd6/action-download-artifact@v3 + with: + # workflow_conclusion: completed + # workflow: build-tests.yml + name: libhvee-e2e-v${{ github.sha }} + + - name: Run libhvee e2e + run: | + # load libhvee-e2e image from tar file + podman load -i libhvee-e2e.tar + - name: Destroy instance if: always() run: |