如何提高TeamCity的构建性能? [英] How do I improve teamcity build performance?
问题描述
我有以下步骤为我的项目:
I have the following steps for my project:
- 在建立
- 在单元测试
- 测试覆盖
- 副本查找器
- FX警察
有没有什么办法让TeamCity的并行执行2-5步骤?我可以使用多个生成代理是什么?
Is there any way to make TeamCity execute 2-5 steps in parallel? Can I use several build agents for that?
推荐答案
是的。假设你有至少四个生成代理,您可以执行以下操作:
Yes. Assuming you have at least four build agents, you can do the following:
- 在
MyProject的
,定义5生成配置(构建
,单元测试
等)。 - 编辑构建配置2-5,并定义一个新的
触发
在构建触发
(选择完成构建触发
,并设置它的成功运行后,运行构建
。 - 编辑构建配置2-5,并确定在
依赖一个新的
(选择神器依赖
添加新的工件依赖
,并选择输出的构建
配置。
- Under
MyProject
, define 5 build configurations (Build
,Unit Tests
, etc). - Edit build configurations 2-5, and define a new
Trigger
inBuild Triggering
(ChooseFinish Build Trigger
, and set it to run after a successful run ofBuild
. - Edit build configurations 2-5, and define a new
Artifact dependency
inDependencies
(ChooseAdd new artifact dependency
, and choose the output of yourBuild
configuration.
只要你有可用的代理,在构建配置后,将运行一个成功的构建
,每一个在其自己的代理。
As long as you have agents available, the build configurations will run after a successful Build
, each on its own agent.
在一个侧面说明,不知道你的具体项目,我建议这样做,只有在整个过程需要很长一段时间(可以说超过约15分钟),并可以腾出这些机器(虚拟的或不)。
On a side note, without knowing your specific project, i'd recommend doing that only if the whole process takes a really long time (lets say more than ~15 minutes), and you can spare those machines (virtual or not).
这篇关于如何提高TeamCity的构建性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!