问题描述
我有一个由步骤A,B和C组成的构建器;第二个由步骤U,V和W组成的构建器:如何阻止步骤U,直到完成步骤A和B?因此,基本上,我希望步骤C和U相互平行。
I have a builder which consists of steps A, B, and C; and a second builder which consists of steps U, V, and W: How can I 'block' step U until steps A and B are finished? So basically I want that steps C and U run parallel to each other.
我的第一个想法是引入两个互锁装置a和b:步骤A要求锁定a,步骤B需要锁b,而步骤U同时需要a和b。
My first idea was to introduce two interlocks, a and b: step A demands lock a, step B demands lock b, and step U demands a and b at the same time.
但是在这种情况下,执行顺序为A-> U-> B,而不是我希望它是A-> B-> U。原因是:步骤对于锁很贪婪。由于锁a,步骤U被阻止,但是需要锁b。这将阻塞步骤B,直到完成步骤U。
But in this situation the execution order is A->U->B, and not A->B->U as I want it to be. The reason: steps are greedy for locks. Step U is blocked because of lock a, but despite that it requires lock b. And this blocks step B until step U is finished.
推荐答案
尝试使用为您的生成器执行的调度程序步骤U,V,W。在第一个构建器中,添加一个步骤。
这应该带给您想要的行为...
Try using a Triggerable
scheduler for your builder which performs steps U,V,W. In the first builder add a step Trigger
after "B" and before "C".This should bring you the desired behaviour ...
这篇关于如何锁定buildbot中的步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!