How to set build name in Pipeline job?

Article ID:220860347
1 minute readKnowledge base

Issue

I would like to set current build name and description in a Pipeline job.

Environment

  • CloudBees Jenkins Enterprise

  • Pipeline

Resolution

Example:

node {
    currentBuild.displayName = "fooName"
    currentBuild.description = "fooDescription"
}

Replace 'fooName' and 'fooDescription' with your desired build name and description.