2
votes

I have a TFS 2018 on-premise server and a separate build server. The build server has an agent that appears "on-line" on the TFS server in the "Agents for pool Default" area of the collection. However, if I go to a project in that collection I do not see the agent registered in that projects "Agents for pool" section.

Do I need an agent for each project? If so, how is that separated on the build server? Is there any documentation specific to my question? I have not found any that address this specifically.

Agent pool at collection level

Agent pool at project level

2
I want to add what @Daniel Mann said below: you need to do a bit of configuring to to add the Project Agent Queue to the Agent Pool that the Agent is attached to. And then set the correct permission to it. (This might be the culprit of why it is not visible. I've had this problem in the past. Click on the Agent, go to Roles, then Agent Queue Users. Maybe add a Group or User.) It might take you some trial and error, but you will eventually get it to work just like the diagram shows.Antebios
I think you are correct in your assessment but I cannot locate the path you outline in order to test. Can you show some images? My build servers' service account is assigned to the agent in the default pool at the collection level. I added image to my original statement.BWW
Please see my answer below and mark it as the answer if it helps to solve your problem.Antebios

2 Answers

3
votes

There are two entities:

  • Agent pools exist at the server-level.
  • Agent queues exist at the project-level, and reference an agent pool.

So, no, you do not need a separate agent for each project. However, you do need a separate agent queue, pointing to the agent pool used across all the other projects. enter image description here

Ref: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/pools-queues?view=vsts

3
votes

I have an older version, TFS 2015 On-Premise, so the navigation path is different. But on VSTS/Azure Devops I had the same issue and this was my solution: Go to the project that needs the Agent Pool, click on "New Agent", select "Base on existing org agent pool", select the agent pool, and then you are done. Now it should be visible to the definition.

enter image description here enter image description here enter image description here