Next Build Number1.6Minimum Jenkins requirement: 2.107.3ID: next-build-number
This plugin is typically useful if you are using the build number as part of a version string, and:
- You do a build outside of Jenkins and you want to skip that number for the next build to avoid duplicate version numbers or failures.
- You created a new job to handle an existing process and want it to continue from where the old one left off.
Jenkins requires that build numbers are always increasing. When you click on the link installed by this plugin, a text field will be shown that contains the next build number to be used. You can change this number to be anything larger than the value for the previous build. Changing this to a smaller number will do nothing.
The value can be changed:
- Graphically by using the Set Next Build Number link for each job (see screenshot)
- Via the CLI using the
set-next-build-numbercommand (Requires >= v1.1)
- Programmatically via the Job DSL plugin (see usage). (Requires >= v1.3 of this plugin and Job DSL >= 1.41)
Note: Not all job types are supported. If support is missing for your job type, feel free to make a Pull Request!
The build number can be changed as part of a Job DSL script.
Support more job types (Organization Folders) (Thanks res0nance!)
Support more job types (individual jobs from Multibranch Pipelines) (Thanks rjohnst!)
Support more job types (eg Pipeline) (Thanks kad!)
Add Job DSL extension point to allow specifying the nextBuildNumber at job creation time (Thanks daspilker!)
Add CLI command (JENKINS-14406)