Home > Software engineering >  How do you know if the right agent is being used?
How do you know if the right agent is being used?

Time:11-08

In Azure Devops, let's say you have three self-hosted agents that run on three different Windows Servers and they are all part of the Default agent pool. When you create a build you're only able to specify what agent pool to pull from. If your wanting to create the build to run a specific agent (windows server) where do you specify this or how does it know to grab the right agent?? If you could please provide and explanation on how this works.

Thank you

CodePudding user response:

Firstly, you can add different capabilities for each of those Agents (even if they are in the same pool). Add them as User defined capabilities.

See : enter image description here

And then in your azure pipelines yaml, you can add that user defined capability as a demand under the pool used : enter image description here

Azure will then only use an agent in that pool that matches all your demands.

CodePudding user response:

According to your description, we suppose that the definition for enter image description here

  • Related