5

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.

Matt
  • 3,658
  • 3
  • 14
  • 27
jay
  • 119
  • 3
  • 12

4 Answers4

6

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.

Community
  • 1
  • 1
Dejulia489
  • 1,165
  • 8
  • 14
2

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

Lance McCarthy
  • 1,884
  • 1
  • 20
  • 40
2

I needed to get myself added to the Project Administrators Group to see the agent in the drop down.

Nick.Mc
  • 18,304
  • 6
  • 61
  • 91
0

I'm learning to set up self-hosted agents with azure pipelines. I'm not sure if this will solve your issue, but here are the spots that I check for what you are describing:

At the organization level in "Organization settings": Deployment Pools is set up

Once you drill into a project "project settings": Deployment Group is set up

Azure Pipeline Setup: Edit the pipeline job and view in the visual designer. You can specify the pool to use for the job.

My guess is that it's in the "Deployment Group" in the project settings.

Good luck. I hope this helps.