简体   繁体   English

Gerrit 只为所有项目中的提交触发一次

[英]Gerrit Trigger only once for commits in all projects

I have 10 repos configured in gerrit trigger plugin.我在 gerrit 触发器插件中配置了 10 个存储库。 But what happens is, if a user has done code changes in all 10 repos and push the code then 10 builds get trigger.但是发生的情况是,如果用户在所有 10 个存储库中都进行了代码更改并推送了代码,那么 10 个构建就会触发。

How can we avoid that and have only one build triggered for this usecase我们如何避免这种情况并且只为这个用例触发一个构建

You can't avoid that, each push will generate an independent event on Gerrit which will trigger an independent build no Jenkins.你无法避免这种情况,每次推送都会在 Gerrit 上生成一个独立的事件,这将触发一个独立的构建,没有 Jenkins。

By default, the builds will remain in the build queue until the first build is complete.默认情况下,构建将保留在构建队列中,直到第一个构建完成。

If you really don't need to execute the queue builds you can try to add an initial build step to verify if a build has just finished and abort the execution of the current build.如果您真的不需要执行队列构建,您可以尝试添加一个初始构建步骤来验证构建是否刚刚完成并中止当前构建的执行。

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

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