简体   繁体   English

如何锁定buildbot中的步骤

[英]how to lock steps in buildbot

I have a builder which consists of steps A, B, and C; 我有一个由步骤A,B和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? 以及由步骤U,V和W组成的第二个构建器:如何在步骤A和B完成之前“阻止”步骤U? So basically I want that steps C and U run parallel to each other. 所以基本上我希望步骤C和U彼此平行。

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和b:步骤A要求锁定a,步骤B要求锁定b,步骤U同时要求a和b。

But in this situation the execution order is A->U->B, and not A->B->U as I want it to be. 但在这种情况下,执行顺序是A-> U-> B,而不是A-> B-> U,正如我想要的那样。 The reason: steps are greedy for locks. 原因是:锁是贪婪的步骤。 Step U is blocked because of lock a, but despite that it requires lock b. 由于锁定a,步骤U被阻止,但尽管它需要锁定b。 And this blocks step B until step U is finished. 并且这阻止步骤B直到步骤U结束。

Try using a Triggerable scheduler for your builder which performs steps U,V,W. 尝试为构建器使用Triggerable调度程序,执行步骤U,V,W。 In the first builder add a step Trigger after "B" and before "C". 在第一个构建器中,在“B”之后和“C”之前添加一个步骤Trigger This should bring you the desired behaviour ... 这应该带给你理想的行为......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM