Subversion Labeling + Build Triggering + Infinite Loop

I'm sorry if I'm repeating this - I couldn't find an answer for this problem. I'm also new to TeamCity.

I have pretty much all default settings; there is only one project defined, using sln2008 runner, build triggering enabled when files are checked in to SVN, and VCS labeling mode is set to "successful only".

After I started a test build (which is always successful, as it's basically an almost empty .NET 2.0 project), it looks like that label is set at SVN (verified; the project tree is copied to /tags/build-1.0.X.X, which was the sample labeling rule I took from the docs), then it looks like TeamCity detects the new check in (the SVN label), and it builds again, applies label to that new build again, and so on. I have been desperately looking for a setting to exclude these TeamCity check-ins somehow (maybe by comparing the username of who did the tag with its own) - but nothing.

I'll probably have to turn off auto-labeling and to labeling manually, which is fine - I just wish this feature works, cause everything else in the system looks perfect.

I'm also looking for more options in labeling rules; e.g. it'd be nice to add a date and time to the label name. Thanks to whoever can help resolve this.

hari

3 comments

Looks like I just had to spend more time studying the documentation. I solved this by adding:
-:user=teamcity:**
as the build trigger rule ("teamcity" is my SVN user used by TeamCity).


Although I don't like the fact that a build includes what I have under tags directory now, and when I tried to modify the SVN checkout paths to begin at trunk, I can't figure out a labeling rule to go back up then down to tags again (so, it doesn't label).

So, still a little bit stuck; any insight appreciated.

0

This helped with excluding directories to be significant in builds:
-:/tags
-:/branches

Add that in Version Control Settings > VCS Root > Checkout Rules.

Hopefully this helps someone else.

0

Hello Hari,

This is one solution.

You may also consider including "trunk" into the URL.
In this case any updates in "tags" won't trigger a new build.
But you also should modify labeling rules.
They now should operate with absolute paths and look like

/project/trunk=>/project/tags

instead of just

trunk=>tags

This helped with excluding directories to be significant in builds:
-:/tags
-:/branches
Add that in Version Control Settings > VCS Root > Checkout Rules.

Hopefully this helps someone else.

--
Sergey Anchipolevsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.