2958 - Slack notification : fix escaped branch name

This commit is contained in:
bruno DA SILVA
2020-05-25 15:34:18 +02:00
parent 876db3e58f
commit 0c6ab86e54

6
Jenkinsfile vendored
View File

@@ -53,16 +53,16 @@ pipeline {
junit 'var/test/phpunit-log.junit.xml'
}
failure {
slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME_ESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
fixed {
slackSend(channel: "#jenkins-itop", color: '#FFa500', message: "Yes! Build repaired! (${currentBuild.result}), Job '${env.JOB_NAME_ESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
slackSend(channel: "#jenkins-itop", color: '#FFa500', message: "Yes! Build repaired! (${currentBuild.result}), Job '${env.JOB_NAME_UNESCAPED} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
environment {
DEBUG_UNIT_TEST = '0'
JOB_NAME_ESCAPED = env.JOB_NAME.replaceAll("%2F", "/")
JOB_NAME_UNESCAPED = env.JOB_NAME.replaceAll("%2F", "/")
}
options {
timeout(time: 20, unit: 'MINUTES')