Created
July 17, 2015 08:06
-
-
Save abelboldu/36810a4f6a05acd8aca3 to your computer and use it in GitHub Desktop.
Jenkins scripts n tricks
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 characters
// CLEAN JOB BUILDS // | |
// 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() } | |
// uncomment these lines to reset the build number to 1: | |
//job.nextBuildNumber = 1 | |
//job.save() | |
// STUCK BUILDS AT END: THIS MAY HELP: // | |
System.setProperty("hudson.util.ProcessTree.disable", "true"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment