I have the following steps for my project:
我的项目有以下步骤:
- build
- unit tests
- test coverage
- duplicates finder
- fx cop
Is there any way to make TeamCity execute 2-5 steps in parallel? Can I use several build agents for that?
有没有办法让TeamCity并行执行2-5步?我可以使用几个构建代理吗?
1 个解决方案
#1
11
Yes. Assuming you have at least four build agents, you can do the following:
是。假设您至少有四个构建代理,则可以执行以下操作:
- 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.
在MyProject下,定义5个构建配置(构建,单元测试等)。
编辑构建配置2-5,并在构建触发中定义新的触发器(选择完成构建触发器,并将其设置为在成功运行构建后运行。
编辑构建配置2-5,并在Dependencies中定义新的Artifact依赖项(选择Add new artifact dependency,然后选择Build配置的输出。
As long as you have agents available, the build configurations will run after a successful Build
, each on its own agent.
只要您有可用的代理,构建配置将在成功构建之后运行,每个构建配置都在其自己的代理上。
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).
另外,在不知道您的具体项目的情况下,我建议仅在整个过程需要很长时间(比如说超过15分钟)时才这样做,并且您可以省去这些机器(虚拟或非虚拟)。
#1
11
Yes. Assuming you have at least four build agents, you can do the following:
是。假设您至少有四个构建代理,则可以执行以下操作:
- 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.
在MyProject下,定义5个构建配置(构建,单元测试等)。
编辑构建配置2-5,并在构建触发中定义新的触发器(选择完成构建触发器,并将其设置为在成功运行构建后运行。
编辑构建配置2-5,并在Dependencies中定义新的Artifact依赖项(选择Add new artifact dependency,然后选择Build配置的输出。
As long as you have agents available, the build configurations will run after a successful Build
, each on its own agent.
只要您有可用的代理,构建配置将在成功构建之后运行,每个构建配置都在其自己的代理上。
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).
另外,在不知道您的具体项目的情况下,我建议仅在整个过程需要很长时间(比如说超过15分钟)时才这样做,并且您可以省去这些机器(虚拟或非虚拟)。