Determining the build # of the .lastSuccessful alias from a script?

My company is looking to switch over to TC from CruiseControl, and I have a question.

In my deployment scripts, I untar my app into a directory named with the svn number of the build. If in the installation script you put "last", it will figure out which is really the last and deploy it. This is with our legacy build artifact directory. With TC, obviously, you just go to .lastSuccessful, but how can I figure out what the build number is that .lastSuccessful points to?

I can have my ant build.xml create a file w/ the svn # in it, but I'm assuming there is a way that I just haven't seen yet.

Thanks so much.

Tim

1 comment

Hello,

Probably the easiest way is to publish a file with build number as artifact
of each build, then in your Ant script you can download this file and use
build number stored in it.

Another, more complicated way is to download teamcity-ivy.xml file (this
file is autogenerated by TeamCity):
http://buildserver/repository/download//.lastSuccessful/teamcity-ivy.xml You can obtain build number by parsing this file, see "revision" attribute of the "info" tag. -- Pavel Sher Software Developer JetBrains, Inc. http://www.jetbrains.com "Develop with pleasure!" "Tim Tischler" ]]> wrote in message
news:2802004.1199909814799.JavaMail.itn@is.intellij.net...

My company is looking to switch over to TC from CruiseControl, and I have
a question.

>

In my deployment scripts, I untar my app into a directory named with the
svn number of the build. If in the installation script you put "last", it
will figure out which is really the last and deploy it. This is with our
legacy build artifact directory. With TC, obviously, you just go to
.lastSuccessful, but how can I figure out what the build number is that
.lastSuccessful points to?

>

I can have my ant build.xml create a file w/ the svn # in it, but I'm
assuming there is a way that I just haven't seen yet.

>

Thanks so much.

>

Tim



0

Please sign in to leave a comment.