万一开始新的工作,请停止Jenkins的工作 [英] Stopping Jenkins job in case newer one is started

查看:125
本文介绍了万一开始新的工作,请停止Jenkins的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以指定,如果作业(A)被多次触发,则将先前的作业从队列中删除,并且如果有足够的可用插槽,则仅将最新的作业留在队列中或开始?

Is it possible to specify that, in case on job (A) is triggered more than once, that previous jobs are removed from queue, and only latest one is left in queue or started if there are enough free slots?

提前谢谢!

推荐答案

您可以通过编程API 直接访问Jenkins.我看不到其他方式.

You can do it with a system Groovy Script run via Groovy Script Plugin. Such a script has direct access to Jenkins via its programming API. I do not see any other way.

这篇关于万一开始新的工作,请停止Jenkins的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆