Skip to content

Commit

Permalink
ci: send all Jenkins build failure notifications to backend channel (#…
Browse files Browse the repository at this point in the history
…17617)

Signed-off-by: Rado <[email protected]>
  • Loading branch information
radnov authored May 28, 2024
1 parent b30476c commit 22d1da8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
6 changes: 5 additions & 1 deletion jenkinsfiles/canary
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ pipeline {
post {
failure {
script {
slack.sendFailureMessage()
slack.sendMessage(
'#ff0000',
slack.buildUrl() + "\nLatest run on ${GIT_BRANCH} failed and needs investigation. :detective-duck:\nCommit: <${GIT_URL}/commit/${GIT_COMMIT}|${GIT_COMMIT}>",
'team-backend'
)
}
}

Expand Down
18 changes: 5 additions & 13 deletions jenkinsfiles/dev
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ pipeline {
always {
implementIoBuildEnded(buildName: "${STAGE_NAME}")
}

failure {
script {
if (buildLog.getLines().contains('There are test failures')) {
slack.sendMessage(
'#ff0000',
slack.buildUrl() + "\nLatest test run on ${GIT_BRANCH} failed and needs investigation. :detective-duck:\nCommit: <${GIT_URL}/commit/${GIT_COMMIT}|${GIT_COMMIT}>",
'team-backend'
)
}
}
}
}
}

Expand Down Expand Up @@ -235,7 +223,11 @@ pipeline {

failure {
script {
slack.sendFailureMessage()
slack.sendMessage(
'#ff0000',
slack.buildUrl() + "\nLatest run on ${GIT_BRANCH} failed and needs investigation. :detective-duck:\nCommit: <${GIT_URL}/commit/${GIT_COMMIT}|${GIT_COMMIT}>",
'team-backend'
)
}
}

Expand Down
6 changes: 5 additions & 1 deletion jenkinsfiles/eos
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ pipeline {
post {
failure {
script {
slack.sendFailureMessage()
slack.sendMessage(
'#ff0000',
slack.buildUrl() + "\nLatest run on ${GIT_BRANCH} failed and needs investigation. :detective-duck:\nCommit: <${GIT_URL}/commit/${GIT_COMMIT}|${GIT_COMMIT}>",
'team-backend'
)
}
}

Expand Down
6 changes: 5 additions & 1 deletion jenkinsfiles/stable
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ pipeline {
post {
failure {
script {
slack.sendFailureMessage()
slack.sendMessage(
'#ff0000',
slack.buildUrl() + "\nLatest run on ${GIT_BRANCH} failed and needs investigation. :detective-duck:\nCommit: <${GIT_URL}/commit/${GIT_COMMIT}|${GIT_COMMIT}>",
'team-backend'
)
}
}

Expand Down

0 comments on commit 22d1da8

Please sign in to comment.