Skip to content
Snippets Groups Projects
Commit b1919e3b authored by tgsiegel's avatar tgsiegel
Browse files

fix?

parent 7c6fdbe2
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ pipeline {
stage('notify') {
steps {
slack_send_start.call()
load("slack.groovy").slack_send_start()
}
}
......@@ -44,12 +44,12 @@ pipeline {
}
post {
success {
slack_send_success
}
failure {
slack_send_failure
}
}
// post {
// success {
// slack_send_success
// }
// failure {
// slack_send_failure
// }
// }
}
\ No newline at end of file
def slack_send_start() {
BUILD_TRIGGERED_BY = "${currentBuild.getBuildCauses()[0].shortDescription} / ${currentBuild.getBuildCauses()[0].userId}"
slackSend(channel: "ci", message: "${JOB_NAME}-#${BUILD_NUMBER}-${GIT_BRANCH} triggered by ${BUILD_TRIGGERED_BY} (<${BUILD_URL}|Open>)")
}
def slack_send_success() {
BUILD_TRIGGERED_BY = "${currentBuild.getBuildCauses()[0].shortDescription} / ${currentBuild.getBuildCauses()[0].userId}"
slackSend(channel: "ci", color: "good", message: "${JOB_NAME}-#${BUILD_NUMBER}-${GIT_BRANCH} success after ${currentBuild.durationString} (<${BUILD_URL}|Open>)")
}
def slack_send_failure() {
BUILD_TRIGGERED_BY = "${currentBuild.getBuildCauses()[0].shortDescription} / ${currentBuild.getBuildCauses()[0].userId}"
slackSend(channel: "ci", color: "danger", message: "${JOB_NAME}-#${BUILD_NUMBER}-${GIT_BRANCH} failed after ${currentBuild.durationString} (<${BUILD_URL}|Open>)")
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment