Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jarek-przygodzki/90e5c68bb137f70903fe to your computer and use it in GitHub Desktop.
Save jarek-przygodzki/90e5c68bb137f70903fe to your computer and use it in GitHub Desktop.
Delete all failed Jenkins builds
def jobName = '(...)'
Jenkins.instance.getItemByFullName(jobName).builds.findAll { it.result == Result.FAILURE}.each { it.delete() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment