we have a teamcity server that continuously builds the latest svn revision. Im currently working on another service that requires the most recent svn revision built by teamcity. I want to talk to teamcity through http. So I use something like the following to get a list of recent builds (side question: is there a limit to the size of this list?)
http:// *** /httpAuth/app/rest/buildTypes/id: *** /builds?status=SUCCESS
This returns an xml document containing info on the recent builds and I can grab the first node to get the most recent build and most of the time this will be the most recent svn revision, however I suspect sometimes the most recent build might be produced with an outdated svn revision.
Can anyone comment on a reliable way to get the build id for the build that was created witht the most recent svn revision? My current plan is going through the list returned by the url above, and use the following to determine the svn revision for each build.
http:// *** /httpAuth/app/rest/builds/id: ***
As the first xml doc grows it seems that this approach might take some time and causes a lot of http calls. Is there a better way? Perhaps we should set up a build type which guarantees that the latest build was built with the most recent svn revision, but I am hoping to avoid that.