Question
- There are multiple perpetual build agents available to run builds of the same build configuration.
- The builds of this configuration are usually triggered one at a time. So it's rare for two or more builds of this configuration to run simultaneously.
- TeamCity always selects the same build agent to run these builds.
- When another build agent will be needed to run the build of this build configuration, it won't have the latest cache, repository state, and so on.
- It will result in much longer build times, especially on large projects.
Is there a way to keep all the build agents warm so that they all have an up-to-date cache, checkout directory, etc.?
Answer
TeamCity always selects the agent that will run the build fastest. So, in a case where there are multiple build agents but only one build is running simultaneously, TeamCity will always default to the build agent with the latest cache, which will make the build faster.
To keep all available agents "warm", a Schedule Trigger with the Trigger Build on All Enabled and Compatible Agents option enabled can be used. This option was designed, in part, for agents' maintenance.
Comments
0 comments
Please sign in to leave a comment.