如何在多个Pull请求中并行运行持续集成? [英] How to run continuous integration in parallel across multiple Pull Requests?

查看:111
本文介绍了如何在多个Pull请求中并行运行持续集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用使用Jenkins测试Github拉取请求builder插件我已经成功在Github上设置了一个玩具项目,并开发Jenkins的安装程序,以便提高PR,或将更改推送到PR分支触发构建。大多数情况下,这是按需要工作的 - 有些东西与首选工作流程不匹配,但是自由编写和维护我们自己的插件是一件大事。



我有一个潜在的展示者。该插件将所有推送到所有PR中的所有推送排队,并且似乎一次只运行一个作业,即使有可用的备用执行程序。在现实世界的项目中,我们可能会有10个活跃的PR,每个可能会在一天内得到一些推动更新以回应QC评论,并且完整的CI运行需要> 30分钟。但是,我们确实有足够的构建执行程序供应,可以同时运行多个作业。



我看不到任何方法来配置PR请求构建器以一次处理多个作业在同一个触发器上,但我可能在Jenkins其他地方缺少一些基本的东西。有没有办法做到这一点,而无需自定义插件?



我已经安装了Jenkins ver。 1.649在新的Ubuntu 14.04服务器上(在VirtualBox guest上),然后在 ghprb插件(目前的版本为1.30.5),包括在Github上设置一个jenkinsbot账户作为协作者,以便将所有集成API调用运行到Github。



我想知道如果我克隆作业(创建新项目和复制现有项目)会有什么样的行为,并且可能会尝试下一步,但我预计这会导致工作多次运行没有任何好处,而不是与其他工作巧妙地交互轮询同一个PR池。

我已经找到配置设置,同时探索更多的问题。

当你知道它是哪个配置项目时很容易,但Jenkins有很多配置可以解决,尤其是当你在探索插件时。



关键是,并行服务排队作业的选项(可用执行程序允许)是核心Jenkins配置,而不是Github PR构建器的一部分。 >

因此,只需选中执行并发构建(如有必要)即可。这个选项应该在配置的第一个未命名部分的底部找到。这是一个非常基本的詹金斯选择,像我这样的新手因为其他选择的高峰而错过了。

I am testing use of Jenkins with Github pull request builder plugin I have successfully set up a toy project on Github and dev installation of Jenkins so that raising a PR, or pushing changes to a PR branch triggers a build. Mostly this works as required - a few things don't match preferred workflow, but the freedom from having to write and maintain our own plugin is a big deal.

I have one potential showstopper. The plugin queues up all pushes in all PRs it sees, and only ever seems to run a single job at a time, even with spare executors available. In the real world project, we may have 10 active PRs, each may get a few pushed updates in a day in response to QC comments, and the full CI run takes > 30 mins. However, we do have enough build executors provisioned to run multiple jobs at the same time.

I cannot see any way to configure the PR request builder to process multiple jobs at once on the same trigger, but I may be missing something basic elsewhere in Jenkins. Is there a way to do this, without needing to customise the plugin?

I have installed Jenkins ver. 1.649 on a new Ubuntu 14.04 server (on a VirtualBox guest) and followed the README in the ghprb plugin (currently version 1.30.5), including setting up a jenkins "bot" account on Github as a collaborator to run all the integration API calls to Github.

I was wondering what the behaviour would be if I cloned the job (create new item and "Copy existing item"), and may try that next, but I expect that will result in the same job being run multiple times for no benefit as opposed to interacting smartly with other jobs polling the same pool of PRs.

解决方案

I have found the config setting whilst exploring more for the question.

It is really easy when you know which config item it is, but Jenkins has a lot of configuration to work through, especially when you are exploring the plugins.

The key thing is that the option to serve queued jobs in parallel (available executors allowing) is core Jenkins config, and not part of the Github PR builder.

So, just check the option Execute concurrent builds if necessary. This option should be found at the bottom of the first, untitled section of config. It is a really basic Jenkins option, that a newbie like me missed due to the mountain of other options.

这篇关于如何在多个Pull请求中并行运行持续集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆