From 41afa3812f6649a4bf18c6addf9ad38bbfb9ee89 Mon Sep 17 00:00:00 2001 From: miampf Date: Fri, 10 May 2024 11:52:38 +0200 Subject: [PATCH] use az group delete instead of terraform destroy --- .github/actions/e2e_mini/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/e2e_mini/action.yml b/.github/actions/e2e_mini/action.yml index a009244d1..093fa6ec8 100644 --- a/.github/actions/e2e_mini/action.yml +++ b/.github/actions/e2e_mini/action.yml @@ -46,11 +46,17 @@ runs: run: | bazel run --test_timeout=14400 //e2e/miniconstellation:push_remote_test + - name: Log in to azure + # only log in if e2e test failed or if the run was cancelled + if: (failure() && steps.e2e-test.conclusion == 'failure') || cancelled() + uses: ./.github/actions/login_azure + with: + azure_credentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} + - name: Clean up after failure shell: bash # clean up if e2e test failed or if the run was cancelled if: (failure() && steps.e2e-test.conclusion == 'failure') || cancelled() run: | cd e2e/miniconstellation - terraform init - terraform destroy -auto-approve + echo $(terraform output -raw rg_name) | xargs az group delete -y --resource-group