Skip to content

Instantly share code, notes, and snippets.

@ehartmann
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehartmann/fe8969e799d0474dc9a3 to your computer and use it in GitHub Desktop.
Save ehartmann/fe8969e799d0474dc9a3 to your computer and use it in GitHub Desktop.
Jenkins Purge queue
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.startsWith('my') }.each { q.cancel(it.task) }
#
Jenkins.instance.computers.each { c ->
c.executors.each { e ->
e.interrupt();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment