Last active
July 29, 2017 18:11
-
-
Save rdeutz/3d550d09aa7babfca5248a6541e7e009 to your computer and use it in GitHub Desktop.
Delete Job Queue in Jenkins
This file contains 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
/*** BEGIN META { | |
"name" : "Clear build queue", | |
"comment" : "If you accidently trigger a lot of unneeded builds, it is useful to be able to <b>cancel</b> them all", | |
"parameters" : [], | |
"core": "1.300", | |
"authors" : [ | |
{ name : "Niels Harremoes" } | |
] | |
} END META**/ | |
import hudson.model.* | |
def queue = Hudson.instance.queue | |
println "Queue contains ${queue.items.length} items" | |
queue.clear() | |
println "Queue cleared" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment