Support Enos failure notifications for other workflow triggers (#21768)

Include in the Slack message only the properties that are common to all the applicable workflow triggers.
This commit is contained in:
Rebecca Willett
2023-07-13 10:57:44 -04:00
committed by GitHub
parent 03ba365032
commit 2a05a48016

View File

@@ -179,22 +179,22 @@ jobs:
uses: hashicorp/actions-slack-status@v1
if: ${{ always() }}
with:
failure-message: "An Enos scenario `run` failed on the branch `${{ github.event.pull_request.head.ref }}` \nPR title: `${{ github.event.pull_request.title }}` \nActor: `${{ github.event.pull_request.user.login }}`"
status: ${{steps.run.outcome}}
slack-webhook-url: ${{secrets.SLACK_WEBHOOK_URL}}
failure-message: "An Enos scenario `run` failed. \nTriggering event: `${{ github.event_name }}` \nActor: `${{ github.actor }}`"
status: ${{ steps.run.outcome }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
# Send a Slack notification to #feed-vault-enos-failures 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 on the branch `${{ github.event.pull_request.head.ref }}` \nPR title: `${{ github.event.pull_request.title }}` \nActor: `${{ github.event.pull_request.user.login }}`"
status: ${{steps.run_retry.outcome}}
slack-webhook-url: ${{secrets.SLACK_WEBHOOK_URL}}
failure-message: "An Enos scenario `run_retry` failed. \nTriggering event: `${{ github.event_name }}` \nActor: `${{ github.actor }}`"
status: ${{ steps.run_retry.outcome }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
# Send a Slack notification to #feed-vault-enos-failures 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 on the branch `${{ github.event.pull_request.head.ref }}` \nPR title: `${{ github.event.pull_request.title }}` \nActor: `${{ github.event.pull_request.user.login }}`"
status: ${{steps.destroy.outcome}}
slack-webhook-url: ${{secrets.SLACK_WEBHOOK_URL}}
failure-message: "An Enos scenario `destroy` failed. \nTriggering event: `${{ github.event_name }}` \nActor: `${{ github.actor }}`"
status: ${{ steps.destroy.outcome }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}