我的项目有以下步骤:
有没有办法让 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
等).Build Triggering
中定义一个新的Trigger
(选择Finish Build Trigger
,并设置为运行Build
成功运行后.Dependencies
中定义一个新的Artifact dependency
(选择Add new artifact dependency
,并选择输出您的 Build
配置.MyProject
, define 5 build configurations (Build
, Unit Tests
, etc). Trigger
in Build Triggering
(Choose Finish Build Trigger
, and set it to run after a successful run of Build
.Artifact dependency
in Dependencies
(Choose Add new artifact dependency
, and choose the output of your Build
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 构建性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!