From 737b48684b246eaa98e29574d3cb838f6263d21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Mon, 20 Nov 2023 11:00:13 +0100 Subject: [PATCH] Use racked machines as runners for the E2E tests --- .github/workflows/qa-azure.yaml | 38 ++++++--------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/.github/workflows/qa-azure.yaml b/.github/workflows/qa-azure.yaml index 6501f1c10..fe622f208 100644 --- a/.github/workflows/qa-azure.yaml +++ b/.github/workflows/qa-azure.yaml @@ -1,7 +1,9 @@ name: Build and run end-to-end tests # Builds the project, and runs end-to-end tests using the generated artifacts. -concurrency: azure-vm +concurrency: + group: Build+E2E-${{ github.head_ref || github.run_id }} + cancel-in-progress: true on: pull_request: @@ -40,7 +42,7 @@ jobs: matrix: mode: ["production", "end_to_end_tests"] name: Build Windows Agent Appx - runs-on: windows-latest + runs-on: [self-hosted, Windows, racked] steps: - name: Set up git uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main @@ -98,23 +100,10 @@ jobs: msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_*.cer msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_*.msixbundle - vm-setup: - name: Set up Azure VM - runs-on: ubuntu-latest - steps: - - name: Azure login - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_VM_CREDS }} - - name: Start the Runner - shell: bash - run: | - az vm start --name ${{ env.az_name }} --resource-group ${{ env.az_resource_group }} - qa: name: Run end-to-end tests on the Azure VM - runs-on: [self-hosted, Windows] - needs: [vm-setup, build-wsl-pro-service, build-ubuntu-pro-for-windows] + runs-on: [self-hosted, Windows, racked] + needs: [build-wsl-pro-service, build-ubuntu-pro-for-windows] steps: - name: Set up git uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main @@ -196,18 +185,3 @@ jobs: # Uninstall certificate $thumbprint = (Get-PfxCertificate -FilePath "ci-artifacts\windows-agent\UbuntuProForWindows_*.cer").Thumbprint Remove-Item -Path "Cert:LocalMachine\TrustedPeople\${thumbprint}" - - stop-vm: - name: Clean up the Azure VM - runs-on: ubuntu-latest - needs: [vm-setup, qa] - if: always() - steps: - - name: Azure login - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_VM_CREDS }} - - name: Deallocate the Runner - shell: bash - run: | - az vm deallocate --name ${{ env.az_name }} --resource-group ${{ env.az_resource_group }}