From 8980173165f27551210266a13a117eadebfeba5b Mon Sep 17 00:00:00 2001 From: Akshith Yellapragada Date: Thu, 11 Apr 2024 14:19:04 -0400 Subject: [PATCH] Add slack bot and failure message --- .github/workflows/acceptance.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/acceptance.yaml b/.github/workflows/acceptance.yaml index 973b24cc..c97e9260 100644 --- a/.github/workflows/acceptance.yaml +++ b/.github/workflows/acceptance.yaml @@ -10,6 +10,12 @@ permissions: checks: write jobs: + fail_test: + runs-on: ubuntu-20.04 + steps: + - name: Fail Test + run: exit 1 + apply_network: name: Apply Network uses: ./.github/workflows/terraform.yaml @@ -108,3 +114,22 @@ jobs: terraform_command: destroy secrets: AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + + notify_slack: + runs-on: ubuntu-20.04 + defaults: + run: + shell: bash + steps: + - name: Notify Slack + if: failure() + uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 + continue-on-error: true + with: + channel-id: '#mission-control' + payload: | + { + "text": "TEST_MESSAGE, IGNORE - 'Flightdeck acceptance tests have failed.'", + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}