How to create a release version with TC?

In our company there are nearly 20 projects that developed by each team. These projects are dependent to each other in someway. Currently we are using release plugin of Maven2 to create a release version and other projects always use release versions rather than SNAPSHOTs version. Apart from that there are more than 20 projects in developed with .NET, in order to integrate all these project we found TeamCity as a best tool but now I think TC cannot create release versions. Am I right? I hope the answer is no, in this case how to create release versions? I tried to create a builder and give the release:prepare and release:perform goals of release plugin but this process is an interactive process and this builder always fails!!!

Can you help me on this?


Comment actions Permalink


TeamCity currently doesn't have special features for supporting Maven release process.
However performing release goals in traditional Maven way is possible if you

  1. configure your VCS Roots to checkout sources on the agent (since only with this mode the release plugin is able to checkin modified POMs).
  2. disable interactive mode for the release plugin (it's possible by providing all the necessary data using -D switch)

IMHO, I don't think that performing the release goal with TeamCity is very useful since it's a parametrized and comparatively rare operation, still requiring some manual post actions (reconfiguring depending build configurations etc.)
Having a simple batch script for that looks quite enough, unless you want it to be triggered automatically.

Comment actions Permalink

Thanks Sergey
Well as I see the TC can create a label (aka tag in svn) each time the build is succeeded this may meet our requirement however unfortunately it can change the version in pom file. Now I have configured TC to create a label each time the buid is sucessful but there is no tag in SVN. What's wrong?
I set the URL in VCS section as svn://
and in label rule I set followings:


I don't know what's wrong. I was thinking that we should set the root of svn path (in our case svn:// and then specify the trunk and tags directory but if I set the URL as the root of project TC cannot get anything from SVN unless you specify the /trunk

thanks again

Comment actions Permalink


   Can you see the tag for successful build on the build changes page? To check it, go to the build page, changes tab, and expand section
   VCS Roots and labels.

   If your repository root is svn:// , the labeling rules should be /trunk => /tags



Please sign in to leave a comment.