Commit 6772403c authored by Mame Bineta Diakite's avatar Mame Bineta Diakite

Update notification

parent 1a10994f
...@@ -80,22 +80,19 @@ pipeline { ...@@ -80,22 +80,19 @@ pipeline {
} }
post { post {
always {
cleanWs()
}
failure { failure {
script { script {
def message = ''' def message = """
{ {
"text": "Échec du build #${env.BUILD_NUMBER} de l'image ${IMAGE_NAME}." "text": "Échec du build #${env.BUILD_NUMBER} de l'image ${IMAGE_NAME}."
} }
''' """
sh """ sh """
curl -X POST -H "Content-Type: application/json" \ curl -X POST -H "Content-Type: application/json" \
-d '${message}' \ -d '${message.replace("'", "\\'")}' \
"${GOOGLE_CHAT_WEBHOOK}" "${GOOGLE_CHAT_WEBHOOK}"
""" """
} }
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment