Jenkins中同一项目的多个并发构建 [英] Multiple concurrent builds of the same project in Jenkins

查看:295
本文介绍了Jenkins中同一项目的多个并发构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的团队中,我们有一个项目想要对它进行连续集成式的测试.我们的构建大约需要2个小时,并由轮询SCM"触发器(使用Perforce作为服务器)触发,并且我们有两个构建节点.

On my team, we have a project that we want to do continuous-integration-style testing on. Our build takes around 2 hours and is triggered by the "Poll SCM" trigger (using Perforce as the server), and we have two build nodes.

当前,如果有人签入更改,那么一个构建节点将立即启动,但是如果签入另一项更改,则另一个节点将无法启动,因为它正在等待上一个作业完成.但是,我希望另一个构建节点尽快使用较新的签入开始构建,这样我们就可以最大程度地进行连续测试(这样,例如,如果一个构建失败,我们早晚知道).

Currently, if someone checks in a change, one build node will start up pretty much right away, but if another change gets checked in, the other node will not kick in, as it's waiting for the previous job to finish. However, I could like the other build node to start a build with the newer checkin as soon as possible, so that we can maximize the amount of continuous testing that's occurring (so that if e.g. one build fails we know sooner rather than later).

是否有任何简单的方法来配置Jenkins作业(对Perforce服务器使用Poll SCM)使其在另一个作业实例已经运行时不会阻塞?

Is there any simple way to configure a Jenkins job (using Poll SCM against a Perforce server) to not block while another instance of the job is already running?

不幸的是,由于项目的性质,不可能简单地将项目分解为多个构建作业,这些作业在多个从属之间流水线化(就像我想将其更改为以这种方式工作一样)./p>

Unfortunately, due to the nature of the project it's not possible to simply break the project up into multiple build jobs that get pipelined across multiple slaves (as much as I'd like to change it to work in this way).

推荐答案

在Jenkins配置中使用如有必要,执行并发构建"选项.

Use the "Execute concurrent builds if necessary" option in Jenkins configuration.

这篇关于Jenkins中同一项目的多个并发构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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