Claudio Saavedra
Claudio Saavedra

Reputation: 165

Teamcity 9.1.3 - setParameter not working

I am trying to change the value of a custom parameter I added to a Job from a step.

I create manually in parameters a parameter called ddd with "dummy" value, then I put this in the build step:

echo "ddd is: %ddd%"
echo "##teamcity[setParameter name='ddd' value='fff']"
echo "Now ddd is: %ddd%"

But the output I get is:

ddd is: dummy
Now ddd is: dummy

The paremeter is not changed.

As far I googled, everybody has used this method to change the value but in my case is not working. What could it be the problem? Teamcity version I am using is the 9.1.3 (build 37176)

Thanks all for the help.

Upvotes: 0

Views: 729

Answers (1)

Claudio Saavedra
Claudio Saavedra

Reputation: 165

I respond myself. The value is actually changed, but it takes effect in the next steps, not in the same step where the value is being changed. So too see the value changed, I had to create another step and then echo the %ddd% parameter and there I could see it changed with the new value.

Thanks.

Upvotes: 2

Related Questions