Last active
October 13, 2017 12:28
-
-
Save k0staa/17076744031c1a52a22759fc9aa25cce to your computer and use it in GitHub Desktop.
Deletes job history and set job build number to 1
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
| def jobName = "APP-RELEASE" | |
| def job = Jenkins.instance.getItem(jobName) | |
| job.getBuilds().each { it.delete() } | |
| // uncomment these lines to reset the build number to 1: | |
| job.nextBuildNumber = 1 | |
| job.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment