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 { failure {
cleanWs() script {
} def message = """
failure { {
script { "text": "Échec du build #${env.BUILD_NUMBER} de l'image ${IMAGE_NAME}."
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}"
"""
} }
"""
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