Detach a template discarding all the inherited settings

Most of the time I am detaching a template from a build configuration, I am doing it because I want to remove those steps from the build. Usually because that template was for some setup like getting connection strings and I want to change which resources that build configuration step is using (there is another template defining the actual build that is staying in such case). So the configuration being copied from the template actively sabotages my work, creating a lot of things I now have to delete one by one with extreme prejudice.

Is there a way to tell teamcity that I want to detach a template and not copy anything from it?

1 comment
Comment actions Permalink
It is the designed behavior. When you detach a build configuration from a template, all settings from the template are copied to the build configuration and enabled for editing. Unfortunately, there is no way to change this behavior at the moment.

However, we've received similar requests before, and there is a feature request to support removing inherited items upon detaching the template: https://youtrack.jetbrains.com/issue/TW-50625. Please feel free to leave a vote to show your interest and to be automatically notified of any updates.

In the meantime, if you considered storing configuration as code, try Kotlin DSL: https://www.jetbrains.com/help/teamcity/kotlin-dsl.html. It would allow replacing the build configuration templates with the Kotlin extension function as suggested here: https://blog.jetbrains.com/teamcity/2021/04/kotlin-dsl-for-beginners-recommended-refactorings/#3_Remove_templates. That would rid of having to remove inherited settings after detaching a template.
0

Please sign in to leave a comment.