Is there a way change upstream parameters for a build chain with snapshot dependencies?

Parameters are propagated downstream, but is there any way for upstream configuration to specify the value of a parameter?

Let's say you have the following simplified chain: A -> B. Where B has snapshot dependency on A, meaning that A is build (if needed) when B is triggered. Both A and B are part of the same project and the project defines a parameter called env.MyParam

Is there any way for build config to specify what the value for env.MyParam of build configuration A will be? Both for custom builds and automated builds that is.

3 comments
Comment actions Permalink

Alina,

I have the same configuration, but I use configuration parameter (not env or system).

I've add configuration parameter to B with name "reverse.dep.<build_conf_A_id>.MyParam" and value "valueFromB":

My building step "build_conf_A_id" have configuration parameter named "MyParam" and with value "valueFromA"

And when I start build from B, build script use "valueFromA", but I expect "valueFromB".

So it doesn't worked :(

How can I realize what is the problem? 

 

1
Comment actions Permalink

Hi Hans, 

Since TeamCity 9.0 it's possible to override Dependencies Properties. To define value of env.MyParam in B build configuration you can configure parameter: 

reverse.dep.<build_conf_A_id>.env.MyParam.

For mode details see the section.

0
Comment actions Permalink

Hi Sergey,

 

this should work just fine. Make sure that the configuration ID is correct, autocompletion should help in there. If it still doesn't work, please share screenshots of your parameter definition of both A and B, so that we can see how both params are set up and see what could be going wrong.

0

Please sign in to leave a comment.