Question
Confirmed on versions: 2025.03.3
Since version 2024.12, TeamCity provides an option to skip snapshot dependencies using the Conditional Build Dependencies feature using the teamcity.build.chain.onlyTags and teamcity.build.chain.skipTags build parameters. In some cases, allowing the users skipping the dependencies can be undesired. E.g., all dependencies are mandatory and the admin must ensure the user with permission to customize parameters cannot bypass them when running a custom build. How to prevent users from being able to skip dependencies without removing the option to customize build parameters altogether?
Answer
One can use the Enforced Templates feature:
- Create a Build Configuration Template where the
teamcity.build.chain.onlyTagsandteamcity.build.chain.skipTagsparameters are set to an empty value, are read-only, and (optionally) hidden. - Select that template in the project's general settings in the Enforced settings templates dropdown.
- Ensure the unauthorized user cannot change project settings.
In this setup, even if the user has the permission to customize build parameters, customizing the teamcity.build.chain.onlyTags and teamcity.build.chain.skipTags parameters to a non-empty value would not be possible.
Comments
0 comments
Please sign in to leave a comment.