diff --git a/Jenkinsfile b/Jenkinsfile index c5fe8831c..5cea15d92 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -350,7 +350,9 @@ 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)}: `${scm.branches.first().name}`" + def branch = params.STAGING_REF ?: scm.branches.first().name + branch = branch.replaceFirst(/^refs\/tags\//, '') + def title = "${java.net.URLDecoder.decode(JOB_NAME)}: `${branch}`" if (params.REVISION_ID != null) { title += " - D${params.REVISION_ID} (Build ${params.BUILD_ID})" }