Agent selection

Whenever a build job starts running, an agent is selected from the pool that will perform the tasks that you have defined in the pipeline. The selection of an agent is done in two steps:

  1. Only agents that are part of the selected pool are eligible for running the tasks. This means that when working with private agent pools, it is wise to have multiple agents in a pool. If you then take one agent offline for maintenance, the agent jobs that rely on the agent pool can continue running.
  2. Before an agent job can run, the demands from each job and the tasks it contains are gathered. As you learned in the Variable groups section, an agent job can specify the demands it has of the agent that it uses. The same goes for tasks—they can also specify demands. To run a job, only agents that meet all of these demands are used. Demands and capabilities are key–value pairs, where the value is an integer. An example capability is msbuild=15.0 and the corresponding demand is msbuild>15.0.

When there is no eligible agent for a build definition, the build eventually fails after a timeout.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.209.95