From 2a05a48016150b4040067ae7b6dc8ab8ba8aa93a Mon Sep 17 00:00:00 2001 From: Rebecca Willett <47540675+rebwill@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:57:44 -0400 Subject: [PATCH] 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. --- .../test-run-enos-scenario-matrix.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-run-enos-scenario-matrix.yml b/.github/workflows/test-run-enos-scenario-matrix.yml index ef54bebc8b..372af9afde 100644 --- a/.github/workflows/test-run-enos-scenario-matrix.yml +++ b/.github/workflows/test-run-enos-scenario-matrix.yml @@ -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 }}