Restricting a Project from an Agent


Multiple teams in our organization use TeamCity(one master), and many projects teams are concerned that their agent can be used by other teams' build configurations.

I understand that build configurations can set Agent's requirement and choose compatible agent and through build agent adminstration for each agent on the Compatible agents tab we can choose different run configuration policy: "Run selected configurations only" and then manually choose build configurations which can run on this agent.

If project team sets the agents requirement and system admin maps run selected configuration to the projects build configuration we can acheive one to one mapping between a project and its build agent. However the problem we are facing is that project teams will have rights only to set Agent's requirement and every time a new build configuration for the project is created project team will have to send request to system admin to make agent compatible for this newly added configuration.

Is there a way by which we can ensure an Agent is made compatible for a project such that for that project whenever a new build configuration is created agent becomes compatible for this new configuration automatically without system admin's intervention?

Basically we want to force an agent to accept only one project's build configurations and vice versa (one project's all build configurations to run on a particular agent).
Can you please suggest how can we achieve this target.

This issue is being brought up as a security concern and it's severely restricting the adoption of TeamCity. I would appreciate your help.

Thank you,


1 comment
Comment actions Permalink


Unfortunately, this scenario is not currently possible without manual intervention.
Here are the related feature request in our tracker that you might watnt to vote for: TW-5447 and TW-11244.

Apart from manual assignment, a TeamCity plugin can be written to watch for new build configuraitons and tweak the agent build configuration policy settings to include it.


Please sign in to leave a comment.