We are using TFS2010 for source control and TeamCity 8.x for CI. In our project we have Main
branch for releases and bug-fixes and Dev
for most of the development. Build steps for both branches are identical. and we have a few build configurations to go through:
I can't seem to make TeamCity to do checkout on a single branch and run build only on the branch that was checked-in to.
First attempt: I've added a VCS Root to point to $/Root
that contains both Main
and Dev
branches and created checkout rules:
First checkin to Main
works fine. Checkin to Dev
after fails like this:
where DoNotExportAttribute
is the file that was modified in the Dev branch. Even if I have
checkbox against "Clean all files in the checkout directory before the build".
My second attempt was to add both of the branches as VCS roots:
But this caused checkout of both branches into the same directory and whatever was checkout first was overwritten by second branch.
Is there a remedy for our case without creating separate configurations for every branch? (we started from config-per-branch, but that proven to be maintenance heavy for the number of steps we do in build)