Team City pending changes for specific build configuration is not as per default branch

4.7k views Asked by At

We are using TeamCity for continuous integration. We have 3 build configurations DEV, QA & PROD.

We are using GIT as the VCS repository. In GIT we have two active branches (v1.0 & v1.1). V1.1 is derived from v1.0. After creating v1.1 we have made serveal changes into v1.1 branch.

Now due to some requirement, we have to make some changes in v1.0 & deploy it (ignoring changes made in v1.1). We made the required changes and updated TeamCity to use v1.0 as the current repository/default branch.

enter image description here

Problem: TeamCity while showing pending changes, its also showing changes from v1.1 branch. Ideally, it should only show changes from branch which we have configured as active/default branch in team city (v1.0 in this case).

How can we force TeamCity to show pending changes only from default branch?

3

There are 3 answers

0
Krzysztof Wolny On

How about having totally separated 3 build configurations for v1.0 so it can be developed, tested and deployed independently from v1.1?

0
Biswajit_86 On

This depends on how you have setup your VCS Root. If you have set the branch specifications field in the vcs root, it will show you pending changes from all branch.

If instead you parameterize the default branch or "branch specifications" with a teamcity parameter and provide that in the build target, it will only show the pending changes in that specific branch.

To explain a bit more, if your VCS setting is to monitor more than one branch, teamcity will show pending updates of all branches that meet the criteria. If you restrict the branches monitored to just 1 , it will only show pending updates to that branch . You can always parameterize the VCS root setting so that your targets can be flexible with what branch yo want to run.

0
Cpt. Senkfuss On

Adding to @Biswajit_86 's answer, in TC9.1.7 (and possibly older releases), once you've set up your branch specifications to include your feature branches, you can select the branch that will be displayed from a top-down menu in the upper left:

enter image description here

You can display all active branches (like in the screenshot), the current default branch or a specific branch from the list of all active and inactive branches.