Azure Pipelines: "No pool was specified"
The confusing case is a YAML file that clearly has pool:, a validation that still says no pool was specified, and the same error with another pool or with no pool at all. Then the YAML is usually not the problem: the pipeline itself has lost a setting.
Set the pipeline's Default agent pool for YAML
- Open the pipeline and choose Edit.
- In the menu with three dots at the top right, choose Triggers, then the YAML tab.
- Choose a pool under Default agent pool for YAML, and Save.
- Several answers to the most viewed question (about 10,000 views) find this field empty although the YAML names a pool. The accepted one creates a new pipeline from the same YAML file instead, which fills the field again.
- The field ends up empty on pipelines created through the REST API, on pipelines moved by a migration tool (one answer: the tool leaves it empty, and the pipeline still saves and validates), and sometimes for no visible reason.
- For comparison, Microsoft's page on agent pools says that on Azure DevOps Services a pipeline that names no pool and no image runs on
vmImage: ubuntu-latest, so an error about a missing pool points at the pipeline's settings rather than at the YAML.
When the pipeline is a pull request's build validation, the pull request waits on it: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in IntelliJ IDEA, Rider or PyCharm, and with Pro runs a failed build policy again once the pipeline is fixed. Its Pipelines tab (version 1.0.86 and later) lists the runs of the repositories you have open and opens a failed task's log in the editor, free to read.
Other things to check
- Where
pool:is. It belongs at the top level, or under a stage or a job, at the same indentation as the keys next to it. Indented one level too far, undertrigger:for example, it is part of the trigger and the pipeline has no pool. - A pool name from a variable.
pool: $(poolName)is not replaced in time, because the pool is chosen when the run is created. Use a parameter or a variable written in the YAML, as on "A template expression is not allowed in this context", or the pool's name itself, as one answer did. - Pipelines created through the REST API. Besides the empty field above, answers fixed it by setting a default branch on the repository and by calling a newer
api-version.
Similar messages about pools
- "Could not find a pool with the name ...": the pool is named, but it does not exist in the project or does not allow this pipeline.
- "No agent found in pool ... which satisfies the specified demands": the pool is there, with no agent for the job.
- "No hosted parallelism has been purchased or granted": the Azure Pipelines pool, with no free grant for the organization.
Azure DevOps pull requests in IntelliJ IDEA, Rider and PyCharm
Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.
Get it on JetBrains Marketplace
Azure DevOps and Azure Pipelines are trademarks of Microsoft Corporation; IntelliJ IDEA, Rider and PyCharm are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.
More: There was a resource authorization issue · No agent found in pool which satisfies the specified demands · Build validation · 日本語