backport of commit f1c6ab41fc6d90811d1a268465f4d9eb712a58b5 (#21535)
Co-authored-by: Rebecca Willett <47540675+rebwill@users.noreply.github.com>
This commit is contained in:
parent
d21351f245
commit
96f1478944
|
@ -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}}
|
||||
|
|
Loading…
Reference in New Issue