Created
May 14, 2015 23:44
-
-
Save rjohnst/b7ea4566e2d1d242a2a3 to your computer and use it in GitHub Desktop.
Revisions
-
rjohnst created this gist
May 14, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ // change this variable to match the name of the job whose builds you want to delete def jobName = "Your Job Name" def job = Jenkins.instance.getItem(jobName) job.getBuilds().each { it.delete() } job.nextBuildNumber = 1 job.save()