Skip to content

Instantly share code, notes, and snippets.

@toshke
Created April 10, 2018 22:54
Show Gist options
  • Save toshke/7796678a82ed6e26ced77c23f72dac40 to your computer and use it in GitHub Desktop.
Save toshke/7796678a82ed6e26ced77c23f72dac40 to your computer and use it in GitHub Desktop.
Clear Jenkins Queue
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