Created
July 28, 2016 17:43
-
-
Save jbest84/74babd807b9770d1113aa46850b45ffc to your computer and use it in GitHub Desktop.
Jenkins Next Build Number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in Jenkins script console | |
def jobName = "slx/8.3.x" // Include folder for multibranch pipeline | |
def nextBuildNumber = 69 | |
def job = Jenkins.getInstance().getItemByFullName(jobName, Job.class) | |
println(job.nextBuildNumber) | |
job.nextBuildNumber = nextBuildNumber | |
job.save() | |
// Credit to comment on https://support.cloudbees.com/hc/en-us/articles/216114978-How-to-set-next-build-number-in-Pipeline-job |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment