2
votes

I recently installed Teamcity 5.0.3. I am trying to setup automated build for a .NET 2.0 VS2005 project. I use NAnt and MSBuild task to perform the build. The project structure is a typical SVN structure

svn://localhost/ITools is my repository and the project structure is

VisualTrack

 trunk

 branches

 tags

I created a new project in Teamcity and then created a build configuration for that project. I asked it to kick off a build everytime there is a change detected in SVN VisualTrack VCS. I also configured it to create a label in VisualTrack/tags for every successful build. The problem I am running into is that the build is getting trigerred everytime teamcity is creating a new label under tags. I only want the build to be triggered if some developer commits his or her changes into trunk. Next step I took was to create a build trigger rule to exclude the tags path by specifying a trigger pattern as -:VisualTrack/tags/**, but looks like its not working. I believe the pattern I specified is not correct. Can someone please help me resolve this issue?

Thanks,

Jaya.

2
I am just providing additional information When I configured VCS Root, I specified labeling rules as /VisualTrack/trunck=>/VisualTrack/tags Set the Checking interval as use global server setting (60 seconds) And for Version Control settings, I have VCS checkout mode as Do not checkout files automatically, VCS labeling mode is Successful only Thanks, JayaJaya mareedu
correcting a typo in my previous comment labeling rule was /VisualTrack/trunk=>/VisualTrack/tagsJaya mareedu

2 Answers

2
votes

Another approach you can use, which works for VCS systems that don't typically use a trunk (such as mercurial), is to prevent triggering on the VCS username that you give to TeamCity.

To do this:

  1. Go into your build setup in TeamCity
  2. Click on Build Triggering (on the right in TeamCity 6.0.3)
  3. Under Trigger Rules, click on Add Trigger Rules
  4. Choose "Do not Trigger Build"
  5. Under VCS username put either the username you gave to TeamCity or you can macro it with: %vcsroot.username%

If you use this, you'll just want to make sure that you give TeamCity it's own account for using your VCS. That's good practice anyway.

1
votes

I'd suggest that you change your TeamCity VCS root URL for this project to be:

svn://localhost/ITools/VisualTrack/trunk

Which is a more typical setup. You can easily setup multiple VCS root configurations in TeamCity. This VCS root would only be concerned with building the trunk area of your project, which it sound like it what you want.