Trying to convert a "visually" defined Azure Pipeline to yaml, but have encountered a problem. With the "visually" defined Azure Pipeline you get a UI similar to below when doing a manual queue:
Note how this UI lets us select between agent pools at queue time. This is a functionality we use quite a lot. We do this since we have pipelines we use for machine learning for example.
Unfortunately, you cannot select Agent pool when switching to yaml based pipeline. It is simply gone, despite the yaml pipeline not defining the pool or similar.
Is there any way for getting the same kind of dropdown box for the Agent pool for yaml based pipelines?
UPDATE: Using a variable for the pool name is possible but also a hassle so not looking for a solution that requires entering the full pool name upon queueing. Hence, either a dropdown box or some other mechanism.
For more information, see the YAML schema for pools. To choose a pool and agent in the classic editor, navigate to the pipeline settings, select the desired Agent pool, and then the desired image from the Agent Specification drop-down. The default Agent Specification is windows-2019.
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.
This is possible as of Feb 2020. Check out the new Runtime Parameters.
Selecting agent pools from a dropdown is actually their very first example.
parameters:
- name: image
displayName: Pool Image
type: string
default: ubuntu-latest
values:
- windows-latest
- vs2017-win2016
- ubuntu-latest
- ubuntu-16.04
- macOS-latest
- macOS-10.14
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With