diff --git a/.github/actions/e2e_cleanup/action.yml b/.github/actions/e2e_cleanup/action.yml new file mode 100644 index 000000000..bd8bc2fc9 --- /dev/null +++ b/.github/actions/e2e_cleanup/action.yml @@ -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 diff --git a/.github/actions/e2e_test/action.yml b/.github/actions/e2e_test/action.yml index b59f69a20..7ca081202 100644 --- a/.github/actions/e2e_test/action.yml +++ b/.github/actions/e2e_test/action.yml @@ -92,6 +92,10 @@ runs: azure_credentials: ${{ inputs.azure_credentials }} if: ${{ inputs.cloudProvider == 'azure' }} + - name: Clean resource group on Azure + uses: ./.github/actions/e2e_cleanup + if: ${{ inputs.cloudProvider == 'azure' }} + - name: Create cluster uses: ./.github/actions/constellation_create with: