diff --git a/jobs/bump-jenkins-plugins.Jenkinsfile b/jobs/bump-jenkins-plugins.Jenkinsfile index fc72905a2..73387ac49 100644 --- a/jobs/bump-jenkins-plugins.Jenkinsfile +++ b/jobs/bump-jenkins-plugins.Jenkinsfile @@ -48,7 +48,6 @@ node { def pluginslist def pluginsToUpdate = [:] - def haveChanges def plugins_lockfile = "jenkins/controller/plugins.txt" stage("Read plugins.txt") { @@ -77,7 +76,6 @@ node { pluginUrl = shwrapCapture("curl -Ls -I -f -o /dev/null -w '%{url_effective}' https://updates.jenkins.io/download/plugins/${pluginName}/latest/${pluginName}.hpi") def latestVersion = getVersionFromPluginUrl(pluginUrl) if (latestVersion.toString() != currentVersion.toString()) { - haveChanges = true pluginsToUpdate["${pluginName}"] = [currentVersion, latestVersion] println("Plugin: ${pluginName} current version is ${currentVersion}, it will be updated to latest version: ${latestVersion}") shwrap(""" @@ -116,8 +114,14 @@ node { currentBuild.result = 'FAILURE' throw e } finally { + if (currentBuild.result == 'SUCCESS') { + currentBuild.description = "[${gitref}@${shortcommit}] ⚡" + } else { + currentBuild.description = "[${gitref}@${shortcommit}] ❌" + } if (currentBuild.result != 'SUCCESS') { - pipeutils.trySlackSend(message: "bump-lockfile #${env.BUILD_NUMBER} <${env.BUILD_URL}|:jenkins:> <${env.RUN_DISPLAY_URL}|:ocean:> [${params.STREAM}]") + message = "build-${containername} #${env.BUILD_NUMBER} <${env.BUILD_URL}|:jenkins:> <${env.RUN_DISPLAY_URL}|:ocean:> [${gitref}@${shortcommit}]" + pipeutils.trySlackSend(color: 'danger', message: message) } } }