This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
5 Replies Last post: Jun 16, 2014 8:50 PM by Alina Mishina  
Riko Eksteen Newbie 6 posts since
Jun 12, 2014
Currently Being Moderated

Jun 12, 2014 5:58 PM

Get build number of another build without a snapshot or artifact dependency

Hi

 

We currently have a snapshot dependency set up on another build so that we can grab and use it's build number (it is basically a set of regression tests that run on previously built binaries).

 

However, this regularly triggers the downstream dependency to start building, and the regression build to wait for a long time.


We just want the build number of the last successful build - we don't want to trigger a snapshot build, and we don't want to create an artifact dependency (the other build doesn't even publish any artifacts).

 

Literally the only thing I want to resolve is the build number of the last successful build of the other project, without doing anything else, but I can't find a way to do it.

 

How can I go about this? I have found the documentation about the Rest URL that can be used to get a last successful build number, but as far as I know I can't resolve this API call into a TeamCity property that I can use in my other build.

 

Thanks

Riko

Eyal Azran Newbie 7 posts since
Apr 4, 2013
Currently Being Moderated
Jun 15, 2014 8:20 PM in response to: Riko Eksteen
Re: Get build number of another build without a snapshot or artifact dependency

A quick google found the Auto Incrementer plugin

http://confluence.jetbrains.com/display/TW/Autoincrementer

 

It looks old from 2011, but I can see it works on version 7 & 8 of TeamCity from this dicussion:

http://stackoverflow.com/questions/17709941/teamcity-share-build-number-between-multiple-build-configurations

 

Hope that helps

Eyal

Alina Mishina JetBrains 361 posts since
May 22, 2014
Currently Being Moderated
Jun 16, 2014 7:30 PM in response to: Riko Eksteen
Re: Get build number of another build without a snapshot or artifact dependency

Hi,

 

In this case you need to use REST API as you mentioned above. You can use the result of REST API request directly in build script or initialize build parameter using service message

##teamcity[setParameter name='ddd' value='fff']

Alina Mishina JetBrains 361 posts since
May 22, 2014
Currently Being Moderated
Jun 16, 2014 8:50 PM in response to: Riko Eksteen
Re: Get build number of another build without a snapshot or artifact dependency

We have this feature request http://youtrack.jetbrains.com/issue/TW-7745, please feel free to comment/vote or create new issue.

More Like This

  • Retrieving data ...