Skip to content

Commit

Permalink
Try to make it send alert to test channel
Browse files Browse the repository at this point in the history
  • Loading branch information
WillGibson committed Oct 1, 2024
1 parent b206994 commit c06bedc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ version: 0.2
env:
parameter-store:
SLACK_TOKEN: /codebuild/slack_oauth_token
SLACK_CHANNEL_ID: /codebuild/slack_oauth_channel
SLACK_CHANNEL_ID: /codebuild/slack_channel_id_test_command_output

phases:
build:
commands:
- echo -e "\nCurrent platform-tools branch/commit: $(git rev-parse --abbrev-ref HEAD)/$(git rev-parse HEAD)"
- exit 1

- source ./regression_tests/actions/create_virtual_environment.sh

- source ./regression_tests/actions/set_up_git_config.sh
Expand Down
4 changes: 2 additions & 2 deletions regression_tests/src/send_failure_alerts.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

env
echo "TARGET_ENVIRONMENT: ${TARGET_ENVIRONMENT}"

if [ "${CODEBUILD_BUILD_SUCCEEDING}" != "1" ] && git branch --contains $CODEBUILD_RESOLVED_SOURCE_VERSION | grep -q "main" && [ "${TARGET_ENVIRONMENT:-toolspr}" == "toolspr" ]; then
if [ "${CODEBUILD_BUILD_SUCCEEDING}" != "1" ] && git branch --contains $CODEBUILD_RESOLVED_SOURCE_VERSION | grep -q "1291-sort-out-alerts" && [ "${TARGET_ENVIRONMENT:-toolspr}" == "tony" ]; then
echo -e "\nAction failed sending alert"
pip install dbt-platform-helper
MESSAGE=":alert: @here DBT Platform regression tests have failed in <https://eu-west-2.console.aws.amazon.com/codesuite/codebuild/763451185160/projects/platform-tools-test/build/${CODEBUILD_BUILD_ID}/?region=eu-west-2|build ${CODEBUILD_BUILD_NUMBER}> :sob:"
Expand Down

0 comments on commit c06bedc

Please sign in to comment.