Skip to content

Instantly share code, notes, and snippets.

@snallami
Created September 25, 2015 16:44
Show Gist options
  • Save snallami/476cd78d05c304798737 to your computer and use it in GitHub Desktop.
Save snallami/476cd78d05c304798737 to your computer and use it in GitHub Desktop.
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.startsWith('my') }.each { q.cancel(it.task) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment