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

Update notification

parent 1a10994f
......@@ -80,22 +80,19 @@ pipeline {
}
post {
always {
cleanWs()
}
failure {
script {
def message = '''
{
"text": "Échec du build #${env.BUILD_NUMBER} de l'image ${IMAGE_NAME}."
}
'''
sh """
curl -X POST -H "Content-Type: application/json" \
-d '${message}' \
"${GOOGLE_CHAT_WEBHOOK}"
"""
failure {
script {
def message = """
{
"text": "Échec du build #${env.BUILD_NUMBER} de l'image ${IMAGE_NAME}."
}
"""
sh """
curl -X POST -H "Content-Type: application/json" \
-d '${message.replace("'", "\\'")}' \
"${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