From 6f741e043f5e23b8bcdcd7c1cbc7a6da5564dc83 Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Mon, 18 Nov 2024 15:26:55 -0800 Subject: [PATCH] Add workflow step to notify on Automated Test failure (#1585) * WIP: Added initial workflow step to notify on failure * Update github workflow to test slack incoming webhook * Testing run the step when there is a failure * Updated with link to action run URL * Removed pull_request trigger * Testing that step doesn't run on success * added back workflow step --- .github/workflows/automated-staging-test-run.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/automated-staging-test-run.yml b/.github/workflows/automated-staging-test-run.yml index 95dfb38d1..ec669b045 100644 --- a/.github/workflows/automated-staging-test-run.yml +++ b/.github/workflows/automated-staging-test-run.yml @@ -17,3 +17,12 @@ jobs: env: AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AUTOMATED_TEST_AZURE_STORAGE_CONNECTION_STRING }} run: ./gradlew rs-e2e:clean rs-e2e:automatedTest + + - name: Send slack notification on test failure + if: failure() + uses: slackapi/slack-github-action@v2.0.0 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: incoming-webhook + payload: | + text: "Automated Staging RS Integration Test Failed!: https://github.com/CDCgov/trusted-intermediary/actions/runs/${{ github.run_id }}"