如何防止CruiseControl

如何防止CruiseControl

本文介绍了如何防止CruiseControl.NET中的并发构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CruiseControl中有几个项目,我注意到经常同时建立两个或多个项目。这似乎引起了冲突。通常,构建失败,如果我查看原因,它就无法访问某些文件,并且如果我等到另一个构建完成,我就可以强制构建失败的构建,它将成功。

We have several projects in CruiseControl and I noticed that often 2 or more projects are building at the same time. This seems to be causing conflicts. Often, a build fails and if I look at the reason, it's failing to access some file, and if I wait until the other build completes, I can just force-build the failed build and it will succeed.

如何配置CC,以便在它们相互冲突时不会同时运行构建?

How can I configure CC so that it won't run builds concurrently if they are going to conflict with each other?

推荐答案

您必须在一个队列中完成所有相互依赖的构建。

You have to do all builds that depend on each other, in one queue.

巡航控制项目配置元素具有两个属性来控制并发性和构建顺序:

The cruise control project configuration element has two attributes to control concurrency and order of build:

<project name="Project 1" queue="Q1" queuePriority="1">

使用队列,您可以定义哪个队列该项目将被构建,使用 queuePriority 您可以定义请求多个构建时的构建顺序。

With queue you can define in which queue the project shall be build, with queuePriority you can define the order of builds when several builds are requested.

因此无法并行构建的两个项目必须位于同一队列中,例如 queue = Q1 。当第二个项目依赖第一个项目时,第二个项目必须具有比第一个项目更高的优先级。

So two projects that cannot be build in parallel have to be on the same queue, say queue="Q1". When the second projects is dependend on the first one, the second project must have a higher priority than the first.

这篇关于如何防止CruiseControl.NET中的并发构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 20:57