From 96f1478944df5c6bd66e09b16b824417dd4f829b Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Fri, 30 Jun 2023 15:51:51 -0400 Subject: [PATCH] backport of commit f1c6ab41fc6d90811d1a268465f4d9eb712a58b5 (#21535) Co-authored-by: Rebecca Willett <47540675+rebwill@users.noreply.github.com> --- .../test-run-enos-scenario-matrix.yml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/test-run-enos-scenario-matrix.yml b/.github/workflows/test-run-enos-scenario-matrix.yml index 7a1abd7bc..cadc8d730 100644 --- a/.github/workflows/test-run-enos-scenario-matrix.yml +++ b/.github/workflows/test-run-enos-scenario-matrix.yml @@ -147,6 +147,7 @@ jobs: - name: Retry Enos scenario if necessary id: run_retry if: steps.run.outcome == 'failure' + continue-on-error: true run: enos scenario run --timeout 60m0s --chdir ./enos ${{ matrix.scenario }} - name: Upload Debug Data if: failure() @@ -156,15 +157,44 @@ jobs: name: ${{ steps.prepare_scenario.outputs.debug_data_artifact_name }} path: ${{ env.ENOS_DEBUG_DATA_ROOT_DIR }} retention-days: 30 + continue-on-error: true - name: Ensure scenario has been destroyed + id: destroy if: ${{ always() }} # With Enos version 0.0.11 the destroy step returns an error if the infrastructure # is already destroyed by enos run. So temporarily setting it to continue on error in GHA continue-on-error: true run: enos scenario destroy --timeout 60m0s --chdir ./enos ${{ matrix.scenario }} - name: Clean up Enos runtime directories + id: cleanup if: ${{ always() }} + continue-on-error: true run: | rm -rf /tmp/enos* rm -rf ./enos/support rm -rf ./enos/.enos + # Send a Slack notification to #feed-vault-enos-failures for if the 'run' step fails. + # There is an incoming webhook set up on the "Enos Vault Failure Bot" Slackbot https://api.slack.com/apps/A05E31CH1LG/incoming-webhooks + - name: Send Slack notification on Enos run failure + uses: hashicorp/actions-slack-status@v1 + if: ${{ always() }} + with: + failure-message: "An Enos scenario run failed." + status: ${{steps.run.outcome}} + slack-webhook-url: ${{secrets.SLACK_WEBHOOK_URL}} + # Send a Slack notification to #feed-vault-enos-failures for if the 'run_retry' step fails. + - name: Send Slack notification on Enos run_retry failure + uses: hashicorp/actions-slack-status@v1 + if: ${{ always() }} + with: + failure-message: "An Enos scenario run_retry failed." + status: ${{steps.run_retry.outcome}} + slack-webhook-url: ${{secrets.SLACK_WEBHOOK_URL}} + # Send a Slack notification to #feed-vault-enos-failures for if the 'destroy' step fails. + - name: Send Slack notification on Enos destroy failure + uses: hashicorp/actions-slack-status@v1 + if: ${{ always() }} + with: + failure-message: "An Enos scenario destroy failed." + status: ${{steps.destroy.outcome}} + slack-webhook-url: ${{secrets.SLACK_WEBHOOK_URL}}