Utilizing Shared Build numbers across build configurations

I have been trying to utilize both %dep.buildid.system.build.number% as part of my shared build numbers as well as %autoinc.sharedbuildnumber% as property values being passed to my build configurations.  The issue I have found with attempting to utilize the %autoinc.sharedbuildnumber% property however has been that each time this value is passed, the number is auto incremented.  For example, when I use %autoinc.sharedbuildnumber%, it is ACTUALLY pulling the current value in the autoincrementer.properties file rather than the current build number for my specified configuration.  So, the value in autoincrementer.properties is ALWAYS one build number ahead of the actual build configuration.  Instead, I would like the value actually utilized by my primary build configurations.  Therefore, instead of using the auto incrementing property, I attempted to use %dep.buildid.system.build.number% instead, and each time I add this as a property to my build configuration, it ends up becoming a configuration parameter with a message of "value required".  When I attempt to run the build, the build breaks because of this configuration parameter value being missing.  Is there a way to utilize this value directly without getting this translation into a configuration parameter and get the actual shared build number value in read-only form as I desire rather than using the autoincrement feature?

If so, please provide the proper/correct syntax for accomplish this.

Thanks.



Attachment(s):
TeamCityConfigurationParameter.png
RunBuildConfigurationError.png
2 comments

Samir,

To use %dep.<btID>.system.build.number% property correctly  the internal ID  of the build configuration (<btID>) format should be btxxx. In your case it would be %dep.bt4.system.build.number%.

Also please note that build number can be shared between build configurations that have snapshot or artifacts dependency. Please refer for details at How To section in  documentation.

0

I discovered that I needed to use the snapshot dependency in addition to changing the build format used for my build configuration property

Thank you.



Attachment(s):
TeamCityBuildIDConfigurationParameter.png
0

Please sign in to leave a comment.