Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set build agent priority in TeamCity?

I have two agents that can build my configuration. I've set up two because I sometimes need to do two simultaneous builds.

How can I set build agent priorities to force TeamCity choose specific agent if both are idle and available?

Now it chooses agent randomly or by some unknown factors...

like image 216
Anna Prosvetova Avatar asked Mar 14 '23 20:03

Anna Prosvetova


1 Answers

You can filter which agents are used but I'm not sure you can specify which idle to agent to use.

If you are worried about TeamCity using the fastest agent it should do this automatically.

The Teamcity documentation states the following.

When there are several idle agents that can run a queued build, TeamCity tries to select the fastest one as follows:

  1. If no builds have previously run on agents, the CPU rank is used to select an agent.

  2. If builds have previously run on agents, the estimated build duration for the given build configuration is used to select an agent. The estimate is made based on the heuristics of the latest builds in the history of the build configuration; for estimating, the execution time of the more recent builds has more weight than that of the earlier builds. Personal and canceled builds are not taken into account, neither are any individual builds whose duration differs significantly from the rest of the builds for this build configuration.

like image 108
Castrohenge Avatar answered Apr 08 '23 14:04

Castrohenge