Skip to content

Commit b2ce042

Browse files
committed
jobs/build-node-image: move emoji to start of message to match other jobs
The build status emoji (e.g. ✨, 🔥) is currently at the end of the slack message. Move it to appear at the beginning of the message to match format used by the other jobs. Also hard code the Jenkins build description emojis since the Slack emojis (e.g. ✨) don't render properly in Jenkins.
1 parent 8df336f commit b2ce042

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

jobs/build-node-image.Jenkinsfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,15 @@ lock(resource: "build-node-image") {
174174
currentBuild.result = 'FAILURE'
175175
throw e
176176
} finally {
177+
message = ":openshift:"
177178
if (currentBuild.result == 'SUCCESS') {
178-
currentBuild.description = ":sparkles: ${build_description}"
179+
currentBuild.description = "${build_description} ⚡"
180+
message = "${message} :sparkles:"
179181
} else {
180-
currentBuild.description = ":fire: ${build_description}"
182+
currentBuild.description = "${build_description} ❌"
183+
message = "${message} :fire:"
181184
}
182-
message = ":openshift: build-node-image #${env.BUILD_NUMBER} <${env.BUILD_URL}|:jenkins:> <${env.RUN_DISPLAY_URL}|:ocean:> ${currentBuild.description}"
185+
message = "${message} build-node-image #${env.BUILD_NUMBER} <${env.BUILD_URL}|:jenkins:> <${env.RUN_DISPLAY_URL}|:ocean:> ${build_description}"
183186
pipeutils.trySlackSend(message: message)
184187
}
185188
}}} // cosaPod, timeout, and lock finish here

0 commit comments

Comments
 (0)