Skip to content

Instantly share code, notes, and snippets.

@KIVagant
Last active March 29, 2017 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KIVagant/dae6e882e4b553c45854743c4cbc54f9 to your computer and use it in GitHub Desktop.
Save KIVagant/dae6e882e4b553c45854743c4cbc54f9 to your computer and use it in GitHub Desktop.
Jenkins multi-branch pipeline: set the next build number
// 1. Open https://your-jenkins-url/script
def job = Jenkins.instance.getItemByFullName("GitAccount/repository/features%2Fbranch")
// println(job.nextBuildNumber)
job.nextBuildNumber = 301 // set what you want
job.saveNextBuildNumber()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment