简体   繁体   English

詹金斯下游工作在Gerrit事件上触发

[英]Jenkins downstream jobs triggering on Gerrit event

in my CI pipeline I have three stages (1, 2 & 3), I use GIT and Gerrit for review support. 在我的CI管道中,我分为三个阶段(1、2和3),我使用GIT和Gerrit进行审核。 The process is that stage 1 jobs will be triggered on Gerrit event "patchet created", eg code is pushed into a virtual branch and held. 该过程是,将在Gerrit事件“创建修补程序”时触发阶段1作业,例如,将代码压入虚拟分支并保留。 If stage 1 finished ok it gives +1 to Gerrit. 如果第一阶段完成,它将给Gerrit +1。 Once manual review is done the code is merged to master. 手动检查完成后,代码将合并到母版中。 This merge triggers stage 2 jobs, which finally triggers stage 3. 此合并触发阶段2的作业,最终触发阶段3。

So, in a downstream Jenkins view it looks like, stage 1 ; 因此,在詹金斯(Jenkins)的下游观点中,它看起来像是阶段1; stage 2 -> stage 3 阶段2->阶段3

Now I want to use build pipeline plugin for visualization (actually deploy plugin, but it requires build pipeline). 现在,我想使用构建管道插件进行可视化(实际上是部署插件,但它需要构建管道)。 This does some analysis of downstream relation to draw a pretty picture of the build and test process. 这对下游关系进行了一些分析,以大致了解构建和测试过程。 Since stage 1 and stage 2 don't have a downstream relationship it naturally misses these. 由于阶段1和阶段2没有下游关系,因此自然会错过这些关系。

Adding downstream relationship breaks my wanted behaviour (I want to have manual review prior to stage 2). 添加下游关系会破坏我想要的行为(我想在阶段2之前进行手动检查)。 Either breaks it by auto triggering on completion of stage 1 or breaks it by requiring manual trigger of stage 2. 通过在阶段1完成时自动触发来中断它,或者通过需要阶段2的手动触发来中断它。

Does anyone have a workaround for this? 有人对此有解决方法吗? Or event better, a solution? 还是更好的解决方案?

thanks, Johan 谢谢,约翰

Just add a manual linkage (second "ticked" on the screenshot): 只需添加一个手动链接(在屏幕截图中第二个“被选中”):

在此处输入图片说明

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

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