Build numbers enquiry

Hi,

I would like to know how can I get the build number from another teamcity task as a prefix of teamcity task build number.

My settings are as follow:

Project
   Compile
      Build number field: 2.0.{build.vcs.number.1}.{0}
      Output: 2.0.8000.300
   Deploy
      Build number field: {build.vcs.number.1}.{0}
      Output: 8001.20
      Ideal output: 2.0.8000.300.20

(Deploy task has artifact dependencies on MSI files generated from compile task.)

At the moment, even the deploy task changes nothing to the SVN VCS, the build number field {build.vcs.number.1} together with {0} will both +1 count whenever it runs, results in an inconsistent between the Compile & Deploy task.

Will  {teamcity.Project.Compile.build.number}.{0} works to provide my desired output? (1. Not having +1 count when run deploy task on {build.vcs.number.1} but on {0}. 2. Having a build number from another task as a prefix)

PS. I have launch an enhancement request a while ago regarding to have date/time stamp support on the build numbers, will that feature be included in the coming release?

Kind regards,
Thomas

3 comments
Comment actions Permalink

Anyone??

TeamCity 4.5 is released~~
Is the date / time stamp available in the build number now?

0
Comment actions Permalink

There are two plugins that can be helpful:
- http://www.jetbrains.net/confluence/display/TW/Date+Build+Number
- http://www.jetbrains.net/confluence/display/TW/Groovy+plug

As for dependent builds, there is similar built-in functionality but it works only if there is snapshot dependency (http://www.jetbrains.net/confluence/display/TCD4/Predefined+Properties#PredefinedProperties-DependenciesProperties). Probably you can extend plugins to support references if builds are linked by artifact dependency.

0

Please sign in to leave a comment.