Removing clean-up rules from build configuration template
Answered
In TeamCity 2018 I had some build configuration templates that defined their own clean-up rules. I've upgraded to 2021 and it looks like this was deprecated, though still partially supported for legacy reason. I'm fine with the deprecation and would like to not use a feature that TeamCity isn't keen on me using, but how do I now remove the clean-up from the templates? I can see the rules as being an inherited rule of the build configurations that implement that template, and I can see a way to edit that clean-up rule, but no way to remove it. Thoughts?
Please sign in to leave a comment.
Hello!
Unfortunately, yes, when the clean-up rules on build configuration templates were deprecated, ability to edit them via UI was lost. As a workaround, you could modify the XML files representing the templates which may be found on the following path:
Specifically, you would need to remove the following section:
The change should be applied automatically in a few minutes after the file is modified (TeamCity will re-read the XML file in the background once the change is detected). Could you please let me know if this works for you?
Also, project rules have priority over the template ones, so, unless there are no rules defined on the project level, template rules would not have an effect.
See also YouTrack task TW-72196 about the problem.
Thanks.