mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-10 19:46:10 +08:00
[Jenkinsfile] Slack notification: use STAGING_REF if available, instead of branch name.
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -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})"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user