mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00:00
gha: k8s-on-aks: Set {create,delete}_aks as steps
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 <fabiano.fidencio@intel.com>
This commit is contained in:
parent
abaf881f4a
commit
13d857a56d
36
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
36
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
@ -17,18 +17,6 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
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:
|
run-k8s-tests:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -38,8 +26,12 @@ jobs:
|
|||||||
- dragonball
|
- dragonball
|
||||||
- qemu
|
- qemu
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: create-aks
|
|
||||||
steps:
|
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
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.checkout-ref }}
|
ref: ${{ inputs.checkout-ref }}
|
||||||
@ -85,16 +77,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||||
|
|
||||||
delete-aks:
|
- name: Delete AKS cluster used to test ${{ matrix.vmm }}
|
||||||
strategy:
|
if: always()
|
||||||
matrix:
|
uses: ./.github/workflows/delete-aks.yaml
|
||||||
vmm:
|
with:
|
||||||
- clh
|
name: ${{ inputs.checkout-ref }}-${{ matrix.vmm }}-amd64
|
||||||
- dragonball
|
|
||||||
- qemu
|
|
||||||
needs: run-k8s-tests
|
|
||||||
if: always()
|
|
||||||
uses: ./.github/workflows/delete-aks.yaml
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.checkout-ref }}-${{ matrix.vmm }}-amd64
|
|
||||||
secrets: inherit
|
|
||||||
|
Loading…
Reference in New Issue
Block a user