Share FULL Build Number Across Configurations

I have 3 build configurations:

  - Red
  - Green
  - Blue

Green and Blue are snapshot dependancies of Red.  So when Red is triggered...  Green and Blue run first... Red runs last.

What i want is all three to have the same build number of 1.2.3.XXX where XXX is an auto incremeting build counter.

My first try was the so called "Shared Build Number" plugin...

Set it up.... what do i get?

  Blue =
  Green =
  Red =

This plugin is obviously useless in sharing the build number if it auto-increments on snapshot dependencies.

My next try was the "Overriding  Dependencies Properties" as defined in the TeamCity 9.x docs:

So in the Green and Blue configurations i set the build number to:   %MySharedBuildNumber%

In the Red configuration i added a "Configuration Parameter"...

   Name:   reverse.dep.*.MySharedBuildNumber
   Value:   1.2.3.%build.counter%

I then reset the current build counters to 100, 200, and 300 in Red, Green, and Blue configs respectively.  So now what do i get?

  Blue =
  Green =
  Red =

It seemed like it wasn't reading the reverse.dep value correctly.  So i changed the value on it to "1.2.3.XXX"....

  Blue = 1.2.3.XXX
  Green = 1.2.3.XXX
  Red = 1.2.3.XXX

So the reverse.dep is being passed from the Red config down to the Blue and Green configs...  it just isn't evaluating things within a configuration parameter value.  So the %build.counter% was being passed and not the value of build.counter from Red.

At this point i'm out of ideas.  I've been working on this for a day...  a whole day wasted to figuring out what should be a basic feature.  A feature that has been in the TC issue tracker since 2008 and still isn't resolved.

1 comment
Comment actions Permalink

Hi Tom,

Please vote for this feature request: Also reverse.dep parameters values are passed down the dependency chain as is. Please vote for
As workaround you can create additional build configuration Yellow, where the buildNumber parameter is specified. Green and Blue depend on Yellow. In this case you will be able to use dep.<btID>.buildNumber parameter in all builds in chain.


Please sign in to leave a comment.