Skip to content

Instantly share code, notes, and snippets.

@amosshapira
Created May 5, 2017 04:56
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 amosshapira/1185dee8f74bc65fbd0f85638b996159 to your computer and use it in GitHub Desktop.
Save amosshapira/1185dee8f74bc65fbd0f85638b996159 to your computer and use it in GitHub Desktop.
Delete all tasks in Jenkins queue
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll().each { q.cancel(it.task) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment