Last active
June 20, 2019 03:26
-
-
Save sandroacoelho/e4417b8ed60848f6bc7d8c22624230bc to your computer and use it in GitHub Desktop.
Jenkins reset history
This file contains hidden or 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
| How to reset jobs in Jenkins | |
| item = Jenkins.instance.getItemByFullName("your-job-name-here") | |
| //THIS WILL REMOVE ALL BUILD HISTORY | |
| item.builds.each() { build -> | |
| build.delete() | |
| } | |
| item.updateNextBuildNumber(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment