Added build notifications in Jenkinsfile
This commit is contained in:
1 parent
e2812494a0
commit
615ca9ba8e
1 file changed
+8
Vendored
+8
@@ -22,6 +22,14 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
|
failure {
|
||||||
|
httpRequest contentType: 'APPLICATION_JSON', httpMode: 'POST', ignoreSslErrors: true, requestBody: "{\"topic\": \"jenkins\", \"title\": \"Jenkins\", \"priority\": 4, \"icon\": \"https://jenkins.homelab.net/favicon.ico\", \"click\": \"${BUILD_URL}\", \"message\": \"Build failed for ${JOB_BASE_NAME} on ${BRANCH_NAME} branch\"}", responseHandle: 'NONE', url: 'https://ntfy.homelab.net', wrapAsMultipart: false
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed {
|
||||||
|
httpRequest contentType: 'APPLICATION_JSON', httpMode: 'POST', ignoreSslErrors: true, requestBody: "{\"topic\": \"jenkins\", \"title\": \"Jenkins\", \"priority\": 3, \"icon\": \"https://jenkins.homelab.net/favicon.ico\", \"click\": \"${BUILD_URL}\", \"message\": \"Pipeline fixed for ${JOB_BASE_NAME} on ${BRANCH_NAME} branch\"}", responseHandle: 'NONE', url: 'https://ntfy.homelab.net', wrapAsMultipart: false
|
||||||
|
}
|
||||||
|
|
||||||
cleanup {
|
cleanup {
|
||||||
cleanWs()
|
cleanWs()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user