Re: Groovy script to cancle jobs from queue

2020-04-27 Thread George Abraham
Were you able to find a solution for this. I encountered something similar where I have many jobs in queue with different parameter values and I wanted to cancel the job where the job name and parameter value matches. def q = Jenkins.instance.queue q.items.each { if((it.task.name == job_name_

Groovy script to cancle jobs from queue

2016-05-23 Thread Paweł Wiśniewski
Hi, I'm currently working on script which will cancel jobs from queue that have value of one parameter set to specific value. Current code is this: #!/usr/bin/groovy import jenkins.model.* import hudson.model.* def config = new HashMap() def bindings = getBinding() config.putAll(bindings.getVa