Branch checkout directory feature
Hello,
Using a mercurial repository i am watching several branches using the "branch specification". I would like to have each branch built in separate folders, for instance:
Given branch specification
* my/branch/topic1 => c:\checkout\topic1
* my/branch/topic2 => c:\checkout\topic2
* my/branch/topic3 => c:\checkout\topic3
That would translate into the checkout directories after the "=>" symbol.
The closest i can get to this behavior is using "teamcity.build.branch" but that will create a folder for each use of "/" in the branch name.
The problem is also mentioned on these links:
https://teamcity-support.jetbrains.com/hc/en-us/community/posts/206194769-Advice-about-branch-setup
https://stackoverflow.com/questions/28158640/branch-checkout-directory-with-teamcity
Right now i could see two possible enhancements when selecting "Custom path" for "Checkout directory":
1: Allow a script to run that would convert a branch into a folder name.
2: Use of a custom Function to compute a hash value for the branch name, same as what is done for VCS Roots.
The above feature would be extremely useful, as right now multiple branches are all built from the same folder, meaning a large overhead from purging and checking out files.
Please sign in to leave a comment.
For those interested there is a workaround in which you use the Groovy plugin and edit GroovyPropertiesProvider.groovy, in order to create environment variables for use in the build. That is what i have done for now.