How do I set the next build number of a Pipeline job?
- CloudBees CI (CloudBees Core) on modern cloud platforms - Managed Master
- CloudBees CI (CloudBees Core) on traditional platforms - Client Master
- CloudBees Jenkins Platform - Client Master
- Jenkins LTS
You can run the following from the Script Console (
def job = Jenkins.instance.getItemByFullName("folderName/my-pipeline-job") job.nextBuildNumber = 10 job.save()
folderName/my-pipeline-job with your folder/job name and
10 with the desired next build number.