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

test slack

parent 98033bcf
No related branches found
No related tags found
No related merge requests found
......@@ -37,4 +37,13 @@ pipeline {
}
}
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