Skip to content

Instantly share code, notes, and snippets.

@namuan
Created September 4, 2018 09:05
Show Gist options
  • Save namuan/6e6892bb695c5368f9c7ad83acd47506 to your computer and use it in GitHub Desktop.
Save namuan/6e6892bb695c5368f9c7ad83acd47506 to your computer and use it in GitHub Desktop.
[Find queued items in Jenkins] #jenkins
import hudson.model.*
def q = Jenkins.instance.queue
def blocked = q.items.find { it.task.name.startsWith("<SEARCH STRING>") }
q.cancel(blocked.task)
println ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment