0
votes

I have a "Release" project in teamcity that has multiple build configurations.

These BC depend on one another in this way.

PreDotNET BC -> DotNET BC -- 
                           |
                           ↓
GruntJSWebFrontend BC --------> Deploy BC
                           ↑
                           |
DelphiMake BC --------------

I have 2 VCS roots, one git for the JS stuff, and one SVN for the .NET stuff.

When the user triggers the "Deploy BC" i want to ask the user with a prompt to select which release version he wants to build. This is the easy part. I configure a parameter (tried system.VERSION and env.VERSION) in the project as a prompt and when anyone triggers the a build with run the user gets asked which version he wants to build.

But now i need this parameter to be used for checking out the right branch in both VCS roots. But whatever i do, whether i give a root path in the VCS roots and try to select a branch via checkout rules or if i add the %system/env.VERSION% parameter to the path of the VCS root config the selected value from the prompt doesn't get passed to the checkout process.

For example if i specify svn://server/blah/Release/%system.VERSION%/something the time when checkout happens the parameter is empty and it tries to check out svn://server/blah/Release//something

The annoying thing is though... if i change the parameter to a not prompt one and set a fixed value, that thing gets passed on just fine.

Any hints? Suggestions?

1

1 Answers

0
votes

I had a similar problem here:

Parameterized Checkout Rules in Teamcity discards parameter when using svn+ssh

I never found the root cause, but I did find a workaround.

The trick seems to be that you move the parameter out of the VCS checkout rule, and into the root itself.

Create a new root, in this case:

svn://server/blah/Release/%system.VERSION%/

then add your checkout rules

+:something => .

Something about having the parameter resolution in the root, and not the rule, led the issue to be fixed for me. It's a messy workaround but it appears to work.

Hope that helps.