pool definition
The pool
keyword specifies which pool to use for a job of the pipeline.
A pool
specification also holds information about the job's strategy for running.
Properties that use this definition: pipeline.pool, jobs.job.pool
Properties that use this definition: pipeline.pool, jobs.job.pool
Properties that use this definition: pipeline.pool, stages.stage.pool, jobs.job.pool, jobs.deployment.pool
Properties that use this definition: pipeline.pool, stages.stage.pool, jobs.job.pool, jobs.deployment.pool
Properties that use this definition: pipeline.pool, stages.stage.pool, jobs.job.pool, jobs.deployment.pool
Overloads
Overload | Description |
---|---|
pool: string | Specify a private pool by name. |
pool: name, demands, vmImage | Full syntax for using demands and Microsoft-hosted pools. |
Overload | Description |
---|---|
pool: string | Specify a private pool by name. |
pool: name, demands, vmImage | Full syntax for using demands and Microsoft-hosted pools. |
Overload | Description |
---|---|
pool: string | Specify a private pool by name. |
pool: name, demands, vmImage | Full syntax for using demands and Microsoft-hosted pools. |
Overload | Description |
---|---|
pool: string | Specify a private pool by name. |
pool: name, demands, vmImage | Full syntax for using demands and Microsoft-hosted pools. |
Overload | Description |
---|---|
pool: string | Specify a private pool by name. |
pool: name, demands, vmImage | Full syntax for using demands and Microsoft-hosted pools. |
Remarks
In Azure DevOps Server 2019 you can specify a pool at the job level in YAML, and at the pipeline level in the pipeline settings UI. In Azure DevOps Server 2019.1 you can also specify a pool at the pipeline level in YAML if you have a single implicit job.
You can specify a pool at the pipeline, stage, or job level.
The pool specified at the lowest level of the hierarchy is used to run the job.
pool: string
Specify a pool by name to use for a job of the pipeline.
pool: string # Specify a private pool by name.
Properties
pool
string
Specify a private pool by name.pool: string # Specify a private pool by name.
Properties
pool
string
Specify a private pool by name.pool: string # Specify a private pool by name.
Properties
pool
string
Specify a private pool by name.pool: string # Specify a private pool by name.
Properties
pool
string
Specify a private pool by name.pool: string # Specify a private pool by name.
Properties
pool
string
Specify a private pool by name.Remarks
Use this syntax to specify a private pool by name.
Note
If your pool name has a space in it, enclose the pool name in single quotes, like pool: 'My pool'
.
Examples
To use a private pool with no demands:
pool: MyPool
pool: name, demands, vmImage
Specify a pool to use for a job of the pipeline using the full syntax.
pool:
name: string # Name of a pool.
demands: string | [ string ] # List of demands (for a private pool)
vmImage: string # Name of the VM image you want to use; valid only in the Microsoft-hosted pool.
Properties
name
string
Name of a pool.demands
string or string list
List of demands (for a private pool).vmImage
string
Name of the VM image you want to use; valid only in the Microsoft-hosted pool.pool:
name: string # Name of a pool.
demands: string | [ string ] # List of demands (for a private pool)
vmImage: string # Name of the VM image you want to use; valid only in the Microsoft-hosted pool.
Properties
name
string
Name of a pool.demands
string or string list
List of demands (for a private pool).vmImage
string
Name of the VM image you want to use; valid only in the Microsoft-hosted pool.pool:
name: string # Name of a pool.
demands: string | [ string ] # List of demands (for a private pool)
vmImage: string # Name of the VM image you want to use; valid only in the Microsoft-hosted pool.
Properties
name
string
Name of a pool.demands
string or string list
List of demands (for a private pool).vmImage
string
Name of the VM image you want to use; valid only in the Microsoft-hosted pool.pool:
name: string # Name of a pool.
demands: string | [ string ] # List of demands (for a private pool)
vmImage: string # Name of the VM image you want to use; valid only in the Microsoft-hosted pool.
Properties
name
string
Name of a pool.demands
string or string list
List of demands (for a private pool).vmImage
string
Name of the VM image you want to use; valid only in the Microsoft-hosted pool.pool:
name: string # Name of a pool.
demands: string | [ string ] # List of demands (for a private pool)
vmImage: string # Name of the VM image you want to use; valid only in the Microsoft-hosted pool.
Properties
name
string
Name of a pool.demands
string or string list
List of demands (for a private pool).vmImage
string
Name of the VM image you want to use; valid only in the Microsoft-hosted pool.Remarks
Specify a Microsoft-hosted pool using the vmImage
property.
If your self-hosted agent pool name has a space in it, enclose the pool name in single quotes, like name: 'My pool'
.
Examples
To use a Microsoft-hosted pool, omit the name and specify one of the available hosted images:
pool:
vmImage: ubuntu-latest
You can specify demands for a private pool using the full syntax.
To add a single demand to your YAML build pipeline, add the demands:
line to the pool
section.
pool:
name: Default
demands: SpecialSoftware # exists check for SpecialSoftware
Or if you need to add multiple demands, add one per line.
pool:
name: MyPool
demands:
- myCustomCapability # exists check for myCustomCapability
- Agent.Version -equals 2.144.0 # equals check for Agent.Version 2.144.0
Note
Checking for the existence of a capability (exists) and checking for a specific string in a capability (equals) are the only two supported operations for demands.
For more information and examples, see Specify demands.
See also
Learn more about conditions and timeouts.
意見反應
提交並檢視相關的意見反應