Is it possible to extract Subversion branch/tag number in TeamCity?

Hi,

I'm migrating our CI environment from CruiseControl to TeamCity and have a question regarding version marking of files when building a release.
I would like to extract the version information from the subversion branch and use it in my ant build script to mark files in the build, can TeamCity help me with this at all?
I could parse it it out from the SVN URL for the buildconfiguration but I can't find any way to access the URL from within my ant build script.
Subversion version information I get from the build.vcs.number parameter, is there anything similar for the SVN URL?

Many thanks in advance for any input on this!
BR
Marianne

1 comment

Marianne,

For the time being TeamCity provides only VCS revision information (in build.vcs.number.1, etc. properties). VCS URL can be passed manually via setting the needed value to the new build property on the Build Configuration -> Properties and environment variables page.

I've created issue to provide properties to store VCS URLs automatically: http://www.jetbrains.net/jira/browse/TW-2939 You can watch/vote for it.

Another approach you can use for now is using checkout on agent mode and executing svn command to get needed information (if svn client is installed on agent).

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.