Skip to content

Instantly share code, notes, and snippets.

@akhy
Created October 27, 2015 08:14
Show Gist options
  • Save akhy/c892c7c65c4eef9bd323 to your computer and use it in GitHub Desktop.
Save akhy/c892c7c65c4eef9bd323 to your computer and use it in GitHub Desktop.
Delete All Jenkins Build in a Job by Number Range
// 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