Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Self Hosted Agent not showing up under Agent pool dropdown

I have multiple project repositories in AzureDevOps and I created a self-hosted agent into our build server. I have defined CICD pipelines for few repositories and it works fine using self-hosted agent.

But when I am trying to setup a CICD pipeline for a new repository in AzureDevOps, the self-hosted agent is not showing up under Agent pool dropdown for this new repository.

like image 670
jay Avatar asked Dec 12 '18 17:12

jay


2 Answers

It sounds like you created another project in your organization but didn't link the agent pool to the new project.

  1. Check Agent Pools - Organization (Create the pool if it doesn't exist)
  2. Check Agent Pools - Project (Add the pool if it doesn't exist)

Creating a New Pool:

  • Click 'New Agent Pool'
  • Provide the pool name
  • Click OK
  • Install an agent using the same pool name

Adding an Existing Pool

  • Click 'New Agent Pool'
  • Select 'Base it on an existing organization agent pool'
  • Click OK

Installing an Agent

You can use the PowerShell module AzurePipelinesPS to install an agent. Check out the Install-APAgent command.

If you get an error trying to add a pool at the project level you may not have permissions to view the agent pools for that project.

like image 101
Dejulia489 Avatar answered Oct 05 '22 10:10

Dejulia489


If you have the agents in their own separate pool, it's an easy solution

  1. Go to Project Settings > Agent Pools
  2. Click Add Pool (blue button at the top right)
  3. Select Existing and choose the pool that contains the agents

enter image description here

You should now see the added pools in the list and can now be used in that project's build pipelines.

enter image description here

like image 45
Lance McCarthy Avatar answered Oct 05 '22 11:10

Lance McCarthy