Does the build steps reflect the Versioned Settings in the current branch?

The documentation for Versioned Settings seems to be a bit lacking, sadly.
I want to know if TeamCity will use the build steps that are checked into the branch that is currently building or if it always uses the default branches build steps (the latter would make me sad).
Does anyone know?

To simplify below is an example scenario:

1. I create a buildstep in TeamCity which prints "A" during a build of the master branch and this is checked into my default branch (master).
2. I create a feature branch and when it builds it prints "A"
3. I modify my build step so it prints "B" in the master branch and the change gets checked into the master branch.

Now what happens when I start a new build in my feature branch. Would it print "A" or "B"?

If the Versioned Settings feature were optimal it would print "A", since that is what currently exists in the branch. However I can't find any information about this in the feature description or documentation.

Does anyone know?

Comment actions Permalink

Hi Henrik,

For example we have a build configuration with one build step which prints "A". The description of this build step is actually stored as xml file. When you enable Versioned Setting synchronization this xml file is checked into the specifed VCS root (the default branch in the VCS root is used). However it knows nothing about branches on which you run the build step.
When you run your build on master or feature branch the build step that is defined in TeamCity (which you can see in UI) is used for both branches.
TeamCity checkout out the build configuration settings from VCS only if the settings are altered in the version control.
Hope I make it clearer for you. Please let me know if you have any questions.

Comment actions Permalink

Hello Alina.

Do you know if this is a planned feature for the future to make it get the settings from the branch the build is currently running for?

The reasoning for my wanting this feature is as follows.
We have a web based product which consists of many different sub sites which are all built in TeamCity. And it is not infrequent that we need to modify our build steps to add builds for new sites etc.
However this poses a problem when you have an organization which requires Hotfixes or potentially wanting to be able to rebuild older versions of the product

So if we today add Product X to our builds, but tomorrow we find out we urgently need to hotfix our product, then it sort of falls apart, since then we need to disable this new build step otherwise that build will fail.
Not really a nice situation. It should be pretty obvious that it would be nice if the build steps are dictated by the settings in the branch you are working with. Even if you can't edit it in the TeamCity gui would be fine (and it by default only reflects how it looks in the default branch), but then you could still manually modify the xmls in the branch if you need to tweak something in builds before you introduce it into the default branch.

It would bring huge benefits for us if this was possible. If we want this now we would basically have to replace all our TeamCity build steps with just a single build step which calls a script we have stored among our source code. It would work, but a lot of the benefits from TeamCity would be lost and it would require quite a bit of work to fix.

Comment actions Permalink

Thank you for provided example. We have the related requests in our tracker:, Please vote for these requests.
However at the moment we do not have an estimated time when it will be implemented.

Comment actions Permalink

The answer I needed.
Not the answer I wanted.

Thanks Alina :)


Please sign in to leave a comment.