title: Azure DevOps change Agent Pool
body: <p>I'm trying to set a build pipeline to run on a specific agent pool. At the moment it insists on working on the "Azure Pipelines" pool: </p>
  
  <p><a href="https://i.stack.imgur.com/3SF0p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3SF0p.png" alt="Azure DevOps agent pools screen"></a></p>
  
  <p>However I'm not able to change the build pipeline's agent pool (at least I'm not sure how). </p>
  
  <p>My YAML looks like this:</p>
  
  <pre class="lang-yaml prettyprint-override"><code>trigger:
  
  - master
  
  pool:
    vmImage: 'ubuntu-latest'
  
  variables:
    buildConfiguration: 'Release'
  
  steps:
  - task: NuGetCommand@2
    inputs:
      command: 'restore'
      restoreSolution: '**/*.sln'
      feedsToUse: 'select'
  
  - script: dotnet build --configuration $(buildConfiguration)
    displayName: 'dotnet build $(buildConfiguration)'
  
  - task: DotNetCoreCLI@2
    displayName: 'Pack the package'
    inputs:
      command: 'pack'
      configuration: 'Release'
      packagesToPack: 'NugetComponents/**/*.csproj'
      nobuild: true
  
  - task: PublishBuildArtifacts@1
    inputs:
      PathtoPublish: '$(Build.ArtifactStagingDirectory)'
      ArtifactName: 'drop'
      publishLocation: 'Container'
  </code></pre>
  
  <p>I'm not sure if I need to change anything here. I can't find anything in the interface for configuring which agent bool a pipeline should use? </p>