Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically changing 'teamcity.build.branch'

I want to set the value of 'teamcity.build.branch' dynamically according to the result of another TC build configuration part of the build pipeline.

Is that even possible? It looks like the value is evaluated and used at the start of the build pipeline.

UseCase:

  • I am executing a TC build configuration that will generate a unique number
  • in the connected TC build configuration part of the same pipeline I want the number to be used in the 'teamcity.build.branch' - just for visualization purposes

I am already using message service to overwrite the parameter, but the change is not taken into account. It looks like the value is read in the very early stage of the build process.

like image 214
Crazyjavahacking Avatar asked Sep 23 '16 09:09

Crazyjavahacking


1 Answers

Check below reference containing build number and git branch name

https://octopus.com/blog/teamcity-version-numbers-based-on-branches

like image 54
Syed Avatar answered Oct 04 '22 00:10

Syed