Cancel all jobs in the queue
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.contains('devops') }.each { q.cancel(it.task) }
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.contains('devops') }.each { q.cancel(it.task) }