问题描述
我的项目有以下步骤:
- 构建
- 单元测试
- 测试覆盖率
- 重复查找器
- 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 个构建配置(Build
、Unit Tests
等). - 编辑构建配置2-5,在
Build Triggering
中定义一个新的Trigger
(选择Finish Build Trigger
,并设置为运行Build
成功运行后. - 编辑构建配置2-5,在
Dependencies
中定义一个新的Artifact dependency
(选择Add new artifact dependency
,并选择输出您的Build
配置.
- 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 构建性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!