如何从 Teamcity 中触发构建中排除标签文件夹?

发布于 2024-08-25 09:15:42 字数 536 浏览 2 评论 0原文

我最近安装了 Teamcity 5.0.3。我正在尝试为 .NET 2.0 VS2005 项目设置自动构建。我使用 NAnt 和 MSBuild 任务来执行构建。项目结构是典型的 SVN 结构

svn://localhost/ITools 是我的存储库,项目结构是

VisualTrack

 trunk

 branches

 tags

我在 Teamcity 中创建了一个新项目,然后为该项目创建了构建配置。每次在 SVN VisualTrack VCS 中检测到更改时,我都会要求它启动构建。我还将其配置为在 VisualTrack/tags 中为每个成功的构建创建一个标签。我遇到的问题是,每次 teamcity 在标签下创建新标签时,都会触发构建。我只希望当某些开发人员将他或她的更改提交到主干时触发构建。我采取的下一步是创建一个构建触发规则,通过将触发模式指定为 -:VisualTrack/tags/** 来排除标签路径,但看起来它不起作用。我相信我指定的模式不正确。有人可以帮我解决这个问题吗?

谢谢,

贾亚。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一紙繁鸢 2024-09-01 09:15:42

您可以使用的另一种方法(适用于通常不使用主干的 VCS 系统(例如 Mercurial))是防止触发您提供给 TeamCity 的 VCS 用户名。

为此,请执行以下操作:

  1. 进入 TeamCity 中的构建设置
  2. 单击“构建触发”(在 TeamCity 6.0.3 中位于右侧)
  3. 在“触发规则”下,单击“添加触发规则”
  4. 选择“不触发构建”
  5. 在 VCS 用户名下输入您提供的用户名到 TeamCity,或者您可以使用宏:%vcsroot.username%

如果您使用此功能,您只需确保为 TeamCity 提供了使用您的 VCS 的自己的帐户。无论如何,这是一个很好的做法。

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.

撕心裂肺的伤痛 2024-09-01 09:15:42

我建议您将此项目的 TeamCity VCS 根 URL 更改为:

svn://localhost/ITools/VisualTrack/trunk

这是更典型的设置。您可以在 TeamCity 中轻松设置多个 VCS 根配置。这个 VCS 根只关心构建项目的主干区域,这听起来像是您想要的。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文