Teamcity not propagating project prompt parameters towards build configuration vcs checkout rules

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

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
the time when checkout happens the parameter is empty and it tries to check out

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?
Comment actions Permalink

Hi Thomas,

A parameter is passed only into the current build in Deploy BC, not for all builds in the chain. If you want to pass parameter up the chain since TeamCity 9.0 you can override the dependencies parameters by redefining them in the dependent build.

Comment actions Permalink

Then why is it working if i remove the whole "prompting" part of that defined parameter and set it to a fixed value?

Bear in mind that i'm talking about project level parameter here. So it should be available to all BC in the project. And it is if i remove the whole prompting for entry part.

I have a somewhat working configuration now. If i want to start a build i of a different version i currently have to change the corresponding project parameter by going into the administration part for said project and change the value there. As soon as turn this parameter into one that is a prompt and as a selection of values behint it it`s not working anymore.

Comment actions Permalink

Thomas, when you set parameter via prompt or by changing the parameters on Run Custom Build dialog, the new value applies to current build only. Not to the configuration, nor the build chain (unless you use reverse.dep params) or the project.

What Alina mentioned is that you setup a certain parameter value for the whole build chain and this value is used in checkout procedure.

Comment actions Permalink

Ok. I will give it a try when I'm back from vacation and report on my findings. Thanks.

Comment actions Permalink

Thanks Alina, thanks Sergey,

it worked!

In the end I added a Project Parameter "reverse.dep.*.system.VERSION" as a prompt with certain values to select from and used that parameter to set "system.VERSION" params in the different BCs.

This now works like a charm.


Please sign in to leave a comment.