Skip to content

Instantly share code, notes, and snippets.

@MatMoore
Created February 7, 2018 14:32
Show Gist options
  • Save MatMoore/1ec26d30f5ee34aceaa8cdb99abf839d to your computer and use it in GitHub Desktop.
Save MatMoore/1ec26d30f5ee34aceaa8cdb99abf839d to your computer and use it in GitHub Desktop.
How to change the iteration number on a jenkins pipeline with multiple branches
Go to JENKINS_URL/script
Run this groovy:
item = Jenkins.instance.getItemByFullName("content-audit-tool/master")
item.updateNextBuildNumber(371)
We had to do this because we forked a project in github, and our release tags were based on the jenkins build number. So we wanted to start the numbering of the new CI builds where we left off.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment