TeamCity subprojects permissions
Hello there,
I'm facing the following problem:
In our TeamCity instance we have a project per product and in one of the products (projects) we have a build configuration for feature branches, so each developer can run that build for their branch.
For our production pipeline we made a subproject which has all it's necessary build configurations. Our problem is that we don't want any dev to be able to trigger the production pipeline(the build configs in the subproject) and we can't figure out a way how to prevent that using TeamCity roles.
Is there a way to prevent a Project Developer role to apply to the subprojects of a project?
/Victor
Please sign in to leave a comment.
Hi Victor,
permissions are propagated from parent projects to child projects. The easiest way to achieve this would be to, instead of nesting them, create them in parallel, have the shared configuration, build templates, etc on the parent project, but keep production and development projects separate. Then assign the users to the child projects, either production or development, according to what they should have access.
Would that work for you?
Denis, can you give a simple example, please? I have the same problem and can't figure how to accomplish your idea.
Thanks.
Hi Sebastian,
I'll give it a try, let's make a project structure here.
Root Project
-YourProject (subproject of Root, give here the most basic permissions the users need for all projects. Project viewer might be more than enough.
--DevBranch (subproject of YourProject, give here the permissions the devs require)
--ProductionBranch (subproject of YourProject, give here the permissions required)
If you need to share the configurations, you can create templates and meta runners at the "YourProject" level, which will be easily available for DevBranch and ProductionBranch, but permissions will be separate.