Dynamically changing 'teamcity.build.branch'

Answered

Hi,

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.

Thanks.

3 comments

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
0

Hello,

You can configure builds in the pipeline to have the same build number. Will it work for you?
See how to configure it in the section: https://confluence.jetbrains.com/display/TCD10/How+To...#HowTo...-sharebuildnumber.

0

I did not make this clear, sorry for that.

The build number is our internal build number not related to TC build number. We need to visualize it in the TC UI, but TC build numbers need to be unchanged.

0

Please sign in to leave a comment.