Skip to content

Commit e359dad

Browse files
v1vviduni94
authored andcommitted
ci(ftr): notify owners in the slack message when failures (elastic#205260)
1 parent b4e7262 commit e359dad

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.buildkite/pipelines/on_merge_unsupported_ftrs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ steps:
3737
machineType: n2-standard-4
3838
preemptible: true
3939
depends_on: build
40+
env:
41+
PING_SLACK_TEAM: "@obs-ux-infra_services-team"
4042
timeout_in_minutes: 120
4143
retry:
4244
automatic:
@@ -54,6 +56,8 @@ steps:
5456
machineType: n2-standard-4
5557
preemptible: true
5658
depends_on: build
59+
env:
60+
PING_SLACK_TEAM: "@obs-ux-infra_services-team"
5761
timeout_in_minutes: 120
5862
retry:
5963
automatic:

.buildkite/scripts/lifecycle/post_command.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,12 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
5252
buildkite-agent artifact upload 'target/test_failures/**/*'
5353
ts-node .buildkite/scripts/lifecycle/annotate_test_failures.ts
5454
fi
55+
5556
fi
57+
58+
if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]]; then
59+
# If the slack team environment variable is set, ping the team in slack
60+
if [ -n "${PING_SLACK_TEAM:-}" ]; then
61+
buildkite-agent meta-data set 'slack:ping_team:body' "${PING_SLACK_TEAM}, can you please take a look at the test failures?"
62+
fi
63+
fi

0 commit comments

Comments
 (0)