如何提高TeamCity的构建性能?性能、TeamCity

2023-09-03 10:54:56 作者:生来就爱笑

我有以下步骤为我的项目:

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 in Build Triggering (Choose Finish Build Trigger, and set it to run after a successful run of Build. Edit build configurations 2-5, and define a new 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).