Kill all queued jenkins jobs
import hudson.model.* | |
def q = Jenkins.instance.queue | |
q.items.each { | |
if (it =~ /deploy-to/) { | |
q.cancel(it.task) | |
} | |
} |
import hudson.model.* | |
def q = Jenkins.instance.queue | |
q.items.each { q.cancel(it.task) } |
This comment has been minimized.
This comment has been minimized.
why not just
src: https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/clearBuildQueue.groovy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Kill all 'queued deploy' jobs: