6

I have a single project with three build configurations:

  1. Integration
  2. Deploy Dev
  3. Deploy Release

Build configs 2 and 3 are dependent on 1 via a snapshot.

There are 3 VCS roots:

  1. Git - All (used with build config 1)
  2. Git - Develop (used with build config 2)
  3. Git - Master (used with build config 3)

The default branch and branch specs are as follows:

Git - All

default branch:

develop

branch spec:

+:refs/heads/(develop)
+:refs/heads/(master)
+:refs/heads/(feature/)
+:refs/heads/(hotfix/
)
+:refs/heads/(release)
+:refs/heads/(support/*)

Git - Develop

default branch:

develop

branch spec:

+:refs/heads/(develop)

Git - Master

default branch:

master

branch spec:

+:refs/heads/(master)

Here is the problem...

When I run a build for the third build config, I want the dependency to check for integration builds on the master branch. It is not doing and will always use the default branch of the integration build config (currently develop).

Is there a way to achieve what I want?

  • Have a single integration build config
  • Have a separate build config that is dependent on only develop branch updates
  • Have a separate build config that is dependent on only master branch updates

The way I have done it in the past involved using multiple CVS end points on a single build config, which also seems wrong and I wanted to avoid that if possible.

Tim Peel
  • 2,274
  • 5
  • 27
  • 43

1 Answers1

2

I would suggest using a variable for branch spec and VCS trigger. That allows you to reuse the VCS root, while still giving you the flexibility to choose the values in each build configuration.

Pedro Pombeiro
  • 1,654
  • 13
  • 14
  • Thanks, so would this be a variable in the default branch and branch spec fields? It is caused because TeamCity uses instead of the actual name of the branch across build configs. I changed it to a single VCS route shortly after I posted the question but now get false pending change reports for the different branches. If you could elaborate on your answer that would be great. – Tim Peel Mar 13 '14 at 13:36
  • Could you please clarify the phrase "It is caused because TeamCity uses ...". What is caused by that? – Pedro Pombeiro Mar 13 '14 at 14:22
  • 1
    The reason it picks the wrong dependency build. As the Deploy Release build config is running from the "" branch of its VCS route, it looks for a dependency in the Integration build config that matches. As it's used "" instead of the actual logical branch name it picks the Integration build that equates to the develop branch, which is wrong, which is causing me my issue. – Tim Peel Mar 13 '14 at 16:05