Created
October 27, 2015 08:14
-
-
Save akhy/c892c7c65c4eef9bd323 to your computer and use it in GitHub Desktop.
Delete All Jenkins Build in a Job by Number Range
This file contains 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
// Jenkins > Manage Jenkins > Script Console | |
Jenkins.instance.getItemByFullName('JobName').builds.findAll { it.number > 5 && it.number < 10 }.each { it.delete() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment