How to make teamcity.build.checkoutDir dependent on teamcity.build.branch?
This is related to the issue I brought up in the issue tracker here: http://youtrack.jetbrains.com/issue/TW-23699
I want to force individual directories by branch name so that changing feature branches in a configuration doesn't force a rebuild of our entire tree (a few hour process on some platforms). Without this, the feature branches feature is basically useless for continuous integration.
I've tried adding "teamcity.build.branch" to the VCS checkout rules. It works for the feature branches, however, that leads to issues when hitting the "Run" button to start the default build. It also appears like changes in the default branch aren't triggering builds anymore.
The above link recommended I "parameter into the checkout directory". I've done this by setting the teamcity.build.checkoutDir to "%system.teamcity.build.checkoutDir%/%teamcity.build.branch%" and changing the checkout rule to "+:.=>./SourceDir". This doesn't work, the source tree ends up in /usr/local/TeamCity/work/68efbd20bfcdb8a/SourceDir.
I want the source to end up in something like this for the master (default) branch:
/usr/local/TeamCity/work/68efbd20bfcdb8a/master/SourceDir
And then similar for feature branches:
/usr/local/TeamCity/work/68efbd20bfcdb8a/feature1/SourceDir
/usr/local/TeamCity/work/68efbd20bfcdb8a/feature2/SourceDir
How to accomplish this without triggering other problems? Please let me know what parameters to set and the associated checkout rules.
Thanks!
Please sign in to leave a comment.
Brian,
we have answered your question in the tracker.
That will be more effective to continue the discussion there.
Thanks