简体   繁体   English

如何从叉子的gitlab合并请求触发jenkins多分支管道构建?

[英]How to trigger jenkins multi-branch pipeline build from a gitlab merge request from a fork?

Folks, 伙计们,

I'm actually having loads of fun since switching to multibranch pipelines in Jenkins which i use in combination with GitLab. 自从我与GitLab结合使用的Jenkins切换到多分支管道以来,我实际上就充满了乐趣。 But something i still do not wrap my head around is how to build merge request that originates from a fork - the ones coming from the same remote triggers a build but not the ones from my fork ! 但是我仍然不明白的是如何构建来自派生的合并请求-来自同一远程的请求触发构建,而不是来自我的派生!

I'd be really happy to hear any idea about this. 我真的很高兴听到关于此的任何想法。

Thanks a lot community ! 非常感谢社区!

Maybe you could try a different approach: 也许您可以尝试其他方法:

A multibranch pipeline is for continuous build (with only compilation and testing). 多分支管道用于连续构建(仅编译和测试)。 This is basically a quick feedback on our current work. 这基本上是对我们当前工作的快速反馈。

Building a MR is altogether another business. 建立MR完全是另一回事。 It is supposed to provide all necessary elements to the reviewer to determine wether a MR can be merged on the master branch or not. 应该将所有必要的元素提供给审阅者,以确定MR是否可以在主分支上合并。 Therefore, it could imply code quality analysis, security analysis, gating, dashboards... 因此,这可能意味着代码质量分析,安全性分析,门控,仪表板...

With this respect, it should be separated in different jobs. 从这方面来说,应将其分为不同的工作。

Having two seperate jobs for the two functionalities is not only cleaner, but I believe, it would solve your trigger from fork problem. 对于这两个功能,有两个分别的工作不仅更清洁,而且我相信,这将解决您因叉子问题而引发的问题。

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

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