Last active
March 10, 2020 03:59
-
-
Save phaneesh/870efea25fb75efda25b9502096cba19 to your computer and use it in GitHub Desktop.
Cleanup Jenkins Workspaces (All Projects)
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
import jenkins.model.* | |
Jenkins.instance.getAllItems(AbstractProject.class) | |
.each { | |
try { | |
println("Wiping workspace for "+it.fullName) | |
it.doDoWipeOutWorkspace() | |
} catch(Exception e) { | |
println("Error wiping workspace for "+it.fullName) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment