Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save s4l3h1/d189170f4ea42bba9831d8580c8892be to your computer and use it in GitHub Desktop.
Save s4l3h1/d189170f4ea42bba9831d8580c8892be to your computer and use it in GitHub Desktop.

Revisions

  1. @jarek-przygodzki jarek-przygodzki created this gist May 5, 2015.
    2 changes: 2 additions & 0 deletions jenkins-delete-failed-builds.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    def jobName = '(...)'
    Jenkins.instance.getItemByFullName(jobName).builds.findAll { it.result == Result.FAILURE}.each { it.delete() }