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.

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.