Template with minimum rules and restrictions


I'm looking for a way to add an environment variable "teamcityVersion" to all build configurations(I have about 300).

Well, the most naive approach for solving this problem would be editing all 300 bcs manually and adding the variable.
Then I thought that maybe I can make a "global template" and apply it to all projects, but it seems like there's no such feature.

So my compromise came down to be this: make a template with the environment variable, and apply them to all 300 manually. This sucks, but hey, at least I have a template on them so I won't need to do it again.

So I tried making a template that adds an environment variable, and change nothing else... but this seems impossible to do. For instance, "Build counter" of "1 General Settings" cannot be set to [whatever it is, leave it alone]. The template insists that I put something in there, which will override the target configuration's current value.

1. Is there a way to make the template values flexible enough so that none of the existing values change?
2. Is there a way to apply the template in a batch mode?


1 comment

Currently not all of the fields can be customized in build configurations inherited from templates. We will change this in the future, once we'll find a good way to do it in the user interface.
To solve your problem you could write relatively simple script or program which will add your parameter right to the project-config.xml files under the .BuildServer/config directory.


Please sign in to leave a comment.