Forked from realityforge/Delete historic hobs and some workspaces
Created
October 9, 2018 21:10
-
-
Save weshayutin/37a51adb289c70ac6bd582f2b661e3e7 to your computer and use it in GitHub Desktop.
Kill all queued jenkins jobs
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 hudson.model.* | |
def q = Jenkins.instance.queue | |
q.items.each { | |
if (it =~ /deploy-to/) { | |
q.cancel(it.task) | |
} | |
} |
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 hudson.model.* | |
def q = Jenkins.instance.queue | |
q.items.each { q.cancel(it.task) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment