等待另一项工作结束后再开始一项工作
我在哈德逊有两份工作,A 和 A。 B.
如果 A 的构建已经在进行中,我只想将 B 放入队列中。 实际上我想将A设置为B的上游项目,但不将A设置为下游项目(加上“上游项目正在构建时阻止构建”高级选项),因为我不需要每次触发A时都构建B。
由于 B 构建步骤是一个 python 脚本,我知道我可以
http://myhudson/srs/job/A/api/json?tree=builds[building]
定期轮询并等待顶部 building
结果中的 true
值,但在此轮询期间,B 将“在进度”,并且只有 B 处于队列中会更清楚。
有什么建议吗? 谢谢!
I have two jobs on Hudson, A & B.
I just want to put B in queue if a build of A is already on-going.
Actually I would like to set A as upstream project of B but without setting A as downstream project (plus "Block build when upstream project is building" advanced option), because I don't need to build B each time A is triggered.
As B build step is a python script, I know I can poll
http://myhudson/srs/job/A/api/json?tree=builds[building]
periodically and wait for a true
value in top building
result, but during this polling, B will be "in progress", and it would be clearer to just have B in queue.
Any suggestions?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种方法是使用 排除插件 并设置两个作业是相互排斥的。
One approach would be to use the Exclusion Plugin and set up the two jobs to be mutually exclusive.