Reputation: 139
I want to give specific names to every Pipeline Job that I build. Eg. #Build_number parameter1 parameter2
I have done it in the freestyle project job, but can't find how to do it in Pipeline project.
Upvotes: 0
Views: 120
Reputation: 3346
you can use below script section in any stage inside your pipeline
pipeline {
agent any
stages {
stage("Any stage"){
steps {
script {
currentBuild.displayName = '#' + currentBuild.number +
'-' + params.parameter1 +
'-' + params.parameter2
currentBuild.description = "The best description."
}
}
}
}
}
Upvotes: 3