I\'m trying to replace our current build pipeline, currently hacked together using old-school Jenkins jobs, with a new job that uses the Jenkins pipeline plugin, and loads a
The answer from @jjst describes how to set the build description in "scripted pipelines". In declarative pipelines you can do the same, but need to place it inside a script { }
block. Here an example taken from comments on the Cloudbees article:
pipeline {
agent any
stages {
stage("1st stage") {
steps {
script {
currentBuild.displayName = "My custom build name"
currentBuild.description = "My custom build description"
}
}
}
}
}