TeamCity share build number between multiple build configurations

Eatdoku picture Eatdoku · Jul 17, 2013 · Viewed 16.6k times · Source

i am looking for a way to share build number between multiple build configurations. The goal is to have an global counter of some sort and all build configurations would be incrementing it and use it in its own the build number.

Answer

Pavel Sher picture Pavel Sher · Jul 18, 2013

If one of build configurations A has snapshot or artifact dependency on build configuration B, then you can obtain build number from B in A with help of dependency parameter:

%dep.<B id>.build.number%

Where <B id> is id of build configuration B (see buildTypeId parameter in URL).