From ac91c8fa0948a1c58073db6095aa6dd5ce014b57 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Mon, 31 Dec 2018 18:12:05 +0000 Subject: [PATCH] [Jenkinsfile] Using `scm.branches` for Slack as `BRANCH_NAME` is only available in multi-branch jobs. --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7c11db1f7..8af2edc90 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -362,7 +362,7 @@ def notifySlack(nodeName, buildStatus = 'STARTED') { def colorCode = '#FF0000' def emoji = ':question:' def duration = currentBuild.durationString.replace(' and counting', '') - def title = "${java.net.URLDecoder.decode(JOB_NAME)} (`${BRANCH_NAME}`)" + def title = "${java.net.URLDecoder.decode(JOB_NAME)}: `${scm.branches.first().name}`" if (params.REVISION_ID != null) { title += " - D${params.REVISION_ID} (Build ${params.BUILD_ID})" }