Builds against developer forks and custom branches

Hi,

I'm restructuring our TC projects to take advantage of some newer features in TeamCity 8.  Before I dive into the question, let me describe the layout and use case..

I have several projects, organized in subprojects.

My Product
--> Version 1
     --> Build number snapshot configuration
     --> Product component 1
          --> component 1 build configuration
     --> Product component 2
          --> component 2 build configuration
--> Version 2
     --> Build number snapshot configuration
     --> Product component 1
          --> component 1 build configuration
     --> Product component 2
          --> component 2 build configuration

The VCS roots are github based and I've set up the parameters as follows:

vcs_root_setting.PNG

The parameters listed are configuration parameters made on My Product and are overridden on each Version subproject.  I've also parameterized the fork portion of the url in order to allow us to override that in custom builds for developer forks.

The above is a simplification of what we have, as we have a deeper tree due to having builds across multiple operating systems and build agents.

During my initial setup phase, I expected to build able to specify the branch in the Custom build dialog, as well as to be able to override the fork so that it would be retrieved from a developer repo instead of the gold repo.  However, when I go to run a custom build and look at the changes tab, it does not have an option to specify the branch to build.

My use case is this:

We have a fairly complicated build scenario and we would like to be able to build custom builds for 1) feature branch testing and 2) custom deployments.  For many of these, we don't want to have to push the branches to the gold repo as most of our developers don't have push rights to the gold repo, just to their own forks.  Ideally, a developer would like to push to their fork then launch a custom build from our build server specifying the proper fork (their fork instead of the gold repo) and the branch.

This seems doable with how I've got it set up.  In the custom build dialog, I should just be able to override the %build_fork% parameter.  I was also expecting a way to specify the branch in the changes tab, but it is not there.  Will overriding the default branch allow me to accomplish this?  Also, we have multiple repos that we link together for this build (we don't use submodules, just many VCS roots).  Is there a way to override a branch on one of them and have the rest use the default branch for the project?

Thanks

-- Dave

Please sign in to leave a comment.