From 13d857a56dbd3a64215c5d31a69d7cb26e5eeeb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 6 Apr 2023 16:50:55 +0200 Subject: [PATCH] gha: k8s-on-aks: Set {create,delete}_aks as steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We've been currently using {create,delete}_aks as jobs. However, it means that if the tests fail we'll end up deleting the AKS cluster (as expected), but not having a way to recreate the cluster without re-running all jobs, which is a waste of resources. Fixes: #6628 Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/run-k8s-tests-on-aks.yaml | 36 ++++++--------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/.github/workflows/run-k8s-tests-on-aks.yaml b/.github/workflows/run-k8s-tests-on-aks.yaml index 371fd05a8e..5c5e51071d 100644 --- a/.github/workflows/run-k8s-tests-on-aks.yaml +++ b/.github/workflows/run-k8s-tests-on-aks.yaml @@ -17,18 +17,6 @@ on: type: string jobs: - create-aks: - strategy: - matrix: - vmm: - - clh - - dragonball - - qemu - uses: ./.github/workflows/create-aks.yaml - with: - name: ${{ inputs.checkout-ref }}-${{ matrix.vmm }}-amd64 - secrets: inherit - run-k8s-tests: strategy: fail-fast: false @@ -38,8 +26,12 @@ jobs: - dragonball - qemu runs-on: ubuntu-latest - needs: create-aks steps: + - name: Create AKS cluster to test ${{ matrix.vmm }} + uses: ./.github/workflows-create-aks.yaml + with: + name: ${{ inputs.checkout-ref }}-${{ matrix.vmm }}-amd64 + - uses: actions/checkout@v3 with: ref: ${{ inputs.checkout-ref }} @@ -85,16 +77,8 @@ jobs: env: KATA_HYPERVISOR: ${{ matrix.vmm }} - delete-aks: - strategy: - matrix: - vmm: - - clh - - dragonball - - qemu - needs: run-k8s-tests - if: always() - uses: ./.github/workflows/delete-aks.yaml - with: - name: ${{ inputs.checkout-ref }}-${{ matrix.vmm }}-amd64 - secrets: inherit + - name: Delete AKS cluster used to test ${{ matrix.vmm }} + if: always() + uses: ./.github/workflows/delete-aks.yaml + with: + name: ${{ inputs.checkout-ref }}-${{ matrix.vmm }}-amd64