如何提高 teamcity 构建性能?
我的项目有以下步骤:
- 构建
- 单元测试
- 测试覆盖率
- 重复查找器
- fx cop
有没有办法让 TeamCity 并行执行 2-5 个步骤?我可以为此使用多个构建代理吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。假设您至少有四个构建代理,您可以执行以下操作:
MyProject
下,定义 5 个构建配置(Build
、Unit Tests
等) )。Build Triggering
中定义一个新的Trigger
(选择Finish Build Trigger
,并将其设置为在成功后运行运行Build
。Dependencies
中定义新的Artifact dependency
(选择Add new artifact dependency< /code>,然后选择你的输出
Build
配置只要您有可用的代理,构建配置就会在成功
Build
后运行,每个配置都会在其自己的代理上运行,无需了解您的具体情况。项目中,我建议仅当整个过程需要很长时间(比方说超过约 15 分钟)并且您可以节省这些机器(虚拟或非虚拟)时才这样做。
Yes. Assuming you have at least four build agents, you can do the following:
MyProject
, define 5 build configurations (Build
,Unit Tests
, etc).Trigger
inBuild Triggering
(ChooseFinish Build Trigger
, and set it to run after a successful run ofBuild
.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.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).