开发者

How to exclude tags folder from triggering build in Teamcity?

开发者 https://www.devze.com 2022-12-24 00:47 出处:网络
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 struct

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/I开发者_运维百科Tools 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号