mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
[Jenkinsfile] Using scm.branches for Slack as BRANCH_NAME is only available in multi-branch jobs.
This commit is contained in:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -362,7 +362,7 @@ def notifySlack(nodeName, buildStatus = 'STARTED') {
|
|||||||
def colorCode = '#FF0000'
|
def colorCode = '#FF0000'
|
||||||
def emoji = ':question:'
|
def emoji = ':question:'
|
||||||
def duration = currentBuild.durationString.replace(' and counting', '')
|
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) {
|
if (params.REVISION_ID != null) {
|
||||||
title += " - D${params.REVISION_ID} (Build ${params.BUILD_ID})"
|
title += " - D${params.REVISION_ID} (Build ${params.BUILD_ID})"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user