From f3114ce1f7b6c9fbdc9d57907a965c520d573d56 Mon Sep 17 00:00:00 2001 From: "linda.nasredin" Date: Sun, 28 Apr 2024 19:56:54 +0300 Subject: [PATCH] Optionally delay destroy in github actions to allow investigation time --- .github/workflows/dsf_poc_cli.yml | 2 +- .github/workflows/dsf_poc_cli_azure.yml | 2 +- .github/workflows/dsf_single_account_cli.yml | 2 +- .github/workflows/sonar_single_account_cli.yml | 4 ++-- .github/workflows/sonar_upgrade.yml | 7 ++++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dsf_poc_cli.yml b/.github/workflows/dsf_poc_cli.yml index da5d05fe8..0f4f1bc95 100644 --- a/.github/workflows/dsf_poc_cli.yml +++ b/.github/workflows/dsf_poc_cli.yml @@ -221,7 +221,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: collected-keys + name: collected-keys-${{ env.TF_WORKSPACE }} path: | ${{ env.EXAMPLE_DIR }}/ssh_keys diff --git a/.github/workflows/dsf_poc_cli_azure.yml b/.github/workflows/dsf_poc_cli_azure.yml index 82eb7da0d..9e9c4846f 100644 --- a/.github/workflows/dsf_poc_cli_azure.yml +++ b/.github/workflows/dsf_poc_cli_azure.yml @@ -248,7 +248,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: collected-keys + name: collected-keys-${{ env.TF_WORKSPACE }} path: | ${{ env.EXAMPLE_DIR }}/ssh_keys diff --git a/.github/workflows/dsf_single_account_cli.yml b/.github/workflows/dsf_single_account_cli.yml index 56e60d167..546a21ae0 100644 --- a/.github/workflows/dsf_single_account_cli.yml +++ b/.github/workflows/dsf_single_account_cli.yml @@ -223,7 +223,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: collected-keys + name: collected-keys-${{ env.TF_WORKSPACE }} path: | ${{ env.EXAMPLE_DIR }}/ssh_keys diff --git a/.github/workflows/sonar_single_account_cli.yml b/.github/workflows/sonar_single_account_cli.yml index 548a1676d..5f40b90ff 100644 --- a/.github/workflows/sonar_single_account_cli.yml +++ b/.github/workflows/sonar_single_account_cli.yml @@ -38,7 +38,7 @@ env: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGE }} JUMP_SERVER_KEY: ${{ secrets.JUMP_SERVER_KEY }} AWS_REGION: ap-southeast-1 - TF_WORKSPACE: single_account + TF_WORKSPACE: sonar_single_account_cli DESTROY_DELAY_SECONDS: 1800 permissions: @@ -238,7 +238,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: collected-keys + name: collected-keys-${{ env.TF_WORKSPACE }} path: | ${{ env.EXAMPLE_DIR }}/ssh_keys diff --git a/.github/workflows/sonar_upgrade.yml b/.github/workflows/sonar_upgrade.yml index 01c360c46..8e43ad6ee 100644 --- a/.github/workflows/sonar_upgrade.yml +++ b/.github/workflows/sonar_upgrade.yml @@ -200,11 +200,12 @@ jobs: echo agentless_gw_0_ip=$(terraform -chdir=$DEPLOYMENT_EXAMPLE_DIR output -json | jq -r '.sonar.value.agentless_gw_main[0].private_ip') >> $GITHUB_ENV echo dsf_ssh_key_file_name=../../../$DEPLOYMENT_EXAMPLE_DIR/$(terraform -chdir=$DEPLOYMENT_EXAMPLE_DIR output -json | jq -r '.dsf_private_ssh_key_file_path.value') >> $GITHUB_ENV - - name: Collect Artifacts for deployment + - name: Collect Artifacts of deployment + id: collect-artifacts if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: collected-keys + name: collected-keys-${{ env.TF_WORKSPACE }} path: | ${{ env.DEPLOYMENT_EXAMPLE_DIR }}/ssh_keys