can we select specific build agents for different configuration's(Release or Debug) for parallel builds

StackOverflow https://stackoverflow.com/questions/21301473

  •  01-10-2022
  •  | 
  •  

Question

I am using Parallel Template(from Jim Lamb's Blog) to run builds for two configuration

  1. one for "Release"
  2. second for "Debug"

I have two agents on my controller. Every time I run this build it selects for the available agent from the controller and randomly selects the agents for the two builds. Sometimes "Release" run on Agent 1 and "Debug" on Agent 2 and sometimes "Debug" runs on Agent 1 and "Release" on Agent 2.

I want to control this activity.

Is there a way to choose specific agents for the two configurations...??? for example.... Suppose I have a controller(Controller 1) with two agents(Agent 1 and Agent 2).

I want to select Agent 1 for "Release" configuration and Agent 2 for "Debug" configuration.

Was it helpful?

Solution

When we provide the Name Filter = Default agent. It takes whichever agent is available and continue with that agent. If we want to choose any specific agent we can use a simple assign activity just after get the build agent to choose the specific build agent as used below.

agentsettings.name= "Agent name".

This will let us choose the build agent that we wanted it to perform the task.

OTHER TIPS

One way would be to put a build agent tag on each of the agents (via the TFS Admin Console) that corresponds to the configuration you want to run on that agent. Then customize your build template (workflow) so that is specifies the appropriate tag criteria when selecting the agent via the Run On Agent activity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top