Add cleanup pre e2e test on Azure

This commit is contained in:
katexochen 2022-08-30 14:35:27 +02:00 committed by Paul Meyer
parent 7c7a4699bc
commit 84b4519ffd
2 changed files with 14 additions and 0 deletions

10
.github/actions/e2e_cleanup/action.yml vendored Normal file
View File

@ -0,0 +1,10 @@
name: e2e test cleanup
description: "Clean up existing resource in the e2e-test resource group on Azure"
runs:
using: "composite"
steps:
- name: cleanup
shell: bash --noprofile --norc -e {0}
run: |
resources="$(az resource list --resource-group "e2e-test" | grep id | awk -F \" '{print $4}')"
for id in $resources; do az resource delete --resource-group "e2e-test" --ids "$id" --verbose; done

View File

@ -92,6 +92,10 @@ runs:
azure_credentials: ${{ inputs.azure_credentials }} azure_credentials: ${{ inputs.azure_credentials }}
if: ${{ inputs.cloudProvider == 'azure' }} if: ${{ inputs.cloudProvider == 'azure' }}
- name: Clean resource group on Azure
uses: ./.github/actions/e2e_cleanup
if: ${{ inputs.cloudProvider == 'azure' }}
- name: Create cluster - name: Create cluster
uses: ./.github/actions/constellation_create uses: ./.github/actions/constellation_create
with: with: