3
votes

We've just upgraded to using TeamCity 9.0.1 and are looking to move towards Perforce Streams. We have a sample depot called //Project containing streams for

//Project/Main 
//Project/Sprint1 
//Project/Sprint2

I would like to be able to configure TeamCity so we have a build capable of building all of these branches from one configuration.

I initially tried setting up a Perforce Stream VCS root in TeamCity:

//Project/%teamcity.build.branch%/

and giving the variable a default value of Main. This works fine from within TeamCity - when I click 'Run...' and change the variable name to Sprint1 it creates a new branch. However, if I'm working in Sprint1 and want to do a remote build from Visual Studio it tells me there are no configurations which can build this change (even though the branch has already been created).

I've tried switching to specifying client mapping, but I'm unable to get the VS plugin to identify the configuration is valid. I guess the problem is that you can't customise the build parameters in the Visual Studio solution until it has worked out which configurations are valid and in this case the validity is impacted by the variable value. How do you setup Perforce Streams in TeamCity so that you can do personal builds to branches?

1

1 Answers

1
votes

I'm afraid, it looks like so far you cannot do this. The only solution is to create specific build configurations for different branches and use them for personal builds.

Better support of feature branches based on Perforce streams is planned, and hopefully we'll include it to Teamcity 9.1 release, planned for the middle of 2015.

Please watch/vote for [this request] to get notified on progress in this area.(https://youtrack.jetbrains.com/issue/TW-18911)


UPDATE: TeamCity 10 has an official support for Perforce stream-based feature branches, task streams are supported as well.

On the Perforce VCS Root page, use Enable feature branches support option to enable this feature.

Corresponding ticket: https://youtrack.jetbrains.com/issue/TW-38330.