diff --git a/.buildkite/pipelines/on_merge_unsupported_ftrs.yml b/.buildkite/pipelines/on_merge_unsupported_ftrs.yml index c7ac27e032bd8..6e28eb10356d3 100644 --- a/.buildkite/pipelines/on_merge_unsupported_ftrs.yml +++ b/.buildkite/pipelines/on_merge_unsupported_ftrs.yml @@ -37,6 +37,8 @@ steps: machineType: n2-standard-4 preemptible: true depends_on: build + env: + PING_SLACK_TEAM: "@obs-ux-infra_services-team" timeout_in_minutes: 120 retry: automatic: @@ -54,6 +56,8 @@ steps: machineType: n2-standard-4 preemptible: true depends_on: build + env: + PING_SLACK_TEAM: "@obs-ux-infra_services-team" timeout_in_minutes: 120 retry: automatic: diff --git a/.buildkite/scripts/lifecycle/post_command.sh b/.buildkite/scripts/lifecycle/post_command.sh index f90a4b451be1f..4d8217a4a284a 100755 --- a/.buildkite/scripts/lifecycle/post_command.sh +++ b/.buildkite/scripts/lifecycle/post_command.sh @@ -52,4 +52,12 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then buildkite-agent artifact upload 'target/test_failures/**/*' ts-node .buildkite/scripts/lifecycle/annotate_test_failures.ts fi + fi + +if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]]; then + # If the slack team environment variable is set, ping the team in slack + if [ -n "${PING_SLACK_TEAM:-}" ]; then + buildkite-agent meta-data set 'slack:ping_team:body' "${PING_SLACK_TEAM}, can you please take a look at the test failures?" + fi +fi \ No newline at end of file