Skip to content

Instantly share code, notes, and snippets.

@nextrevision
Last active February 19, 2016 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nextrevision/70aa7be49d058df9877b to your computer and use it in GitHub Desktop.
Save nextrevision/70aa7be49d058df9877b to your computer and use it in GitHub Desktop.
Jenkins groovy script to delete builds x through y for a specific job
# from http://superuser.com/a/589532
Jenkins.instance.getItemByFullName('jobName').builds.findAll { it.number > 1 && it.number < 100 }.each { it.delete() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment