Search code examples
tfsazure-devopsazure-pipelinesagentazure-pipelines-release-pipeline

TFS 2017 - Build agents priority and order


I have a pool with 10 agents. I have noticed that usually only some of them are used, and others still there have hardly ever been used.

I am wondering if is there a way to say to TFS to use all of them? For example, something like TFS grabs them based on the order. At the first time uses the number 1, then 2, 3. After using the agent it puts the agent to the end of the queue. So, before using number 1 again TFS would use all the numbers first.

That would be very good to have that logic in place to have the best use of all the agents we have in place.


Solution

  • Just as Daniel said, they don't need to be rotated. If some of them are not required, you can get rid of them.

    However, you can set Demands in your build definition if you want to use a specific agent every time.

    In the build definition, under General, add the Demand Agent.Name and set it equal to the name of the build agent under the value column, or add the custom demands (for example, use USER CAPABILITIES) to identify the specific agent. This will ensure the build is serviced by only this agent.

    So, you can create different build definitions to use each of the agents.

    Please reference this article for details: Build vNext, distributing load to different agents.

    However, we can not achieve that for now. There is a user voice request here for the feature. You can go and vote it up to achieve it in the future.