简体   繁体   English

Jenkins-Webhooks或PollSCM

[英]Jenkins - Webhooks OR PollSCM

In a scenario where continuous integration is important, for triggering builds which is a better option Webhooks or PollSCM. 在持续集成很重要的情况下,对于触发构建,Webhooks或PollSCM是更好的选择。

These are my current understanding on both methods: 这些是我目前对这两种方法的理解:

  • PollSCM is a heavy operation and depending on it to trigger build means we need to fire it frequently. PollSCM是一项繁重的操作,因此依靠它来触发构建意味着我们需要频繁触发它。 But the configuration is easier and it is safer than web hooks as Jenkins will be communicating to code repo. 但是,由于Jenkins将与代码存储库通信,因此配置比Web钩子更容易且更安全。
  • Web hooks can give you exact build trigger time without checking for it constantly. Web挂钩可以为您提供确切的构建触发时间,而无需经常检查。 But on the other hand, there are security concerns when you are opening up a connection from outside and configuration is not easy compared to PollSCM. 但是,另一方面,从外部打开连接时存在安全问题,与PollSCM相比,配置不容易。

Looking forward to know the exact pros and cons of both ways. 期待了解这两种方式的确切利弊。

If your build cycle is very short (a few minutes) and if you want to trigger a build for each commit, the Webhooks solution is better. 如果您的构建周期很短(几分钟),并且您想为每次提交触发构建,则Webhooks解决方案会更好。

But if your build cycle is longer (15/20 minutes) and if you don't need to build for each commit, the PollSCM is a good candidate :) 但是,如果构建周期较长(15/20分钟),并且不需要每次提交都进行构建,则PollSCM是不错的选择:)

In my company, we are using Git/Stash and Jenkins + a Webhook to trigger a build every time something is committed. 在我的公司中,我们每次使用Git / Stash和Jenkins + Webhook来触发构建时都会触发。 For the pull requests, we are using the Stash pullrequest builder plugin for Jenkins. 对于拉取请求,我们使用Jenkins的Stash pullrequest构建器插件。

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

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