Skip to content

Commit 18bf510

Browse files
committed
Send slack message to #docker-builds to notify the maintainers when a failure occurs
1 parent 46e2ffa commit 18bf510

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Jenkinsfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,16 @@ pipeline {
127127
}
128128
}
129129
}
130+
131+
post {
132+
changed {
133+
script {
134+
if ( currentBuild.currentResult == 'SUCCESS' ) {
135+
slackSend(channel: '#docker-builds', color: '#00FF00', message: '@channel the docker build has returned back to normal.')
136+
} else {
137+
slackSend(channel: '#docker-builds', color: '#FF0000', message: '@channel the docker build has failed!')
138+
}
139+
}
140+
}
141+
}
130142
}

0 commit comments

Comments
 (0)