更新时间:2023-12-05 13:51:22
我自己没有测试过,但是查看了 API 应该可以通过以下方式实现:
I haven't tested it myself, but looking at the API it should be possible in the following way:
import hudson.model.*
import jenkins.model.Jenkins
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.startsWith('my') }.each { q.cancel(it.task) }
相关 API 链接: