1
votes

I'm using TeamCity Professional 2020.1.2 . under a project I have multiple build configurations. what I want to do is generate a random string in every build of build config "A" and override it every time, build config "A" runs. Then I need to use it somewhere in build config "B"

I know how to pass variables between build steps, but I don't know how to do the same between different build configurations.

echo "##teamcity[setParameter name='env.path' value='/sample/path']"

I thought meybe there should be a global parameter registry which every build can read and write from.

1

1 Answers

2
votes

Have you tried to use a snapshot dependency between build configurations? In this case, you can access a parameter from another configuration in the chain by %dep.BUILD_ID.param%. Here are two related pages in the documentation: "Build dependencies" and "Dependencies properties".