我应该将 TeamCity 的 VCS 根指向哪里?

发布于 2024-08-08 02:33:59 字数 609 浏览 4 评论 0原文

我正在设置 TeamCity,我想知道应该使用什么作为 VCS 根。

我的 svn 存储库位于 http://obfuscatedserver/svn/main/MyProject1/

我应该设置VCS 根目录位于 http://obfuscatedserver/svn/main/MyProject1/ 或使用位于 < 的 trunk 文件夹a href="http://obfuscatedserver/svn/main/MyProject1/trunk/" rel="noreferrer">http://obfuscatedserver/svn/main/MyProject1/trunk/ ?

现在,我使用 trunk 文件夹,并且必须将 Build Runner“构建文件路径”设置设置为“trunk/MyProject1.proj”(使用 msbuild)。

哪个位置合适?

I am setting up TeamCity and I am wondering what should be used as the VCS Root.

My svn repository is located at http://obfuscatedserver/svn/main/MyProject1/

Should I set the VCS Root at http://obfuscatedserver/svn/main/MyProject1/ or use the trunk folder at http://obfuscatedserver/svn/main/MyProject1/trunk/ ?

Right now I am not using the trunk folder and I had to set the Build Runner "Build file path" setting to "trunk/MyProject1.proj" (using msbuild).

Which location is the appropriate one?

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

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

发布评论

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

评论(3

回眸一遍 2024-08-15 02:33:59

我建议使用 http://obfuscatedserver/svn/main/ 作为 VCS 根目录,然后限制哪些文件夹使用结帐规则进行结帐。

添加以下签出规则(构建配置的第 2 部分):

  +:/MyProject1/trunk

您可能还需要将 msbuild 文件的位置更新为

  MyProject1/trunk/MyProject1.proj

并将工作目录设置为

  MyProject1/trunk

这看起来确实需要大量工作,但下次您想要添加新版本中,您不必创建新的 VCSroot。

然而,真正的好处来自于 TeamCity 轮询您的 SVN 存储库。轮询您的存储库一次就会发现所有构建的所有更改。如果您的存储库托管在 sourceforge 或 googlecode 等地方,这一点尤其重要。您当然不想为您配置的每个构建轮询他们的服务器。

此外,如果您的存储库由第三方托管,您可能需要将 vcsRoot 的检查间隔设置为每小时一次或类似的间隔。如果您不想等待一小时过去,您可以随时要求 teamcity 从任何构建概述页面上的操作菜单中检查待处理的更改。

I would recommend using http://obfuscatedserver/svn/main/ as the VCS Root, and then restricting which folders are checked out using checkout rules.

Add the following checkout rules (section 2 of the build config):

  +:/MyProject1/trunk

You will probably also need to update the location of your msbuild file to

  MyProject1/trunk/MyProject1.proj

and set the working directory to

  MyProject1/trunk

This does seem like a lot of work, but next time you want to add a new build, you don't have to create a new VCSroot.

However, the real benefit comes when TeamCity polls your SVN repo. Polling your repo once will discover all the changes for all your builds. This is especially important if your repository is hosted somewhere like sourceforge or googlecode. You certainly don't want to be polling their servers for every build you have configured.

Also, if your repo is hosted by a third party, you might want to set the vcsRoot's Checking interval to once an hour or similar. You can always ask teamcity to check for pending changes from the actions menu on any of the build overview pages if you can't be bothered waiting for the hour to elapse.

场罚期间 2024-08-15 02:33:59

您应该使用 .../trunk/ 因为它会加快结帐速度,否则 TeamCity 也会获得您可能不需要构建的所有分支。

You should use .../trunk/ as it will speed up the checkout, otherwise TeamCity will get all the branches as well which you probably don't need for the build.

狼性发作 2024-08-15 02:33:59

到目前为止,我一直使用 ../trunk 作为根。这很好,因为就我而言,所有项目都位于主干下方,因此我可以轻松完成完整的结账。

但标签功能不起作用,因为您需要使用“trunk => Tags”之类的规则以及作为这些目录的父目录的根。由于我想标记每个版本,我现在考虑更改为类似于 CrazyCoder 建议的布局。

Up to the present, I have used ../trunk as the root. This is nice because in my case all the projects are located below trunk and so I can do the complete checkout easily.

But the labeling feature does not work because you need to use a rule like "trunk => tags" and a root that is a parent of these directories. As I'd like to label every release build I now think about changing to a layout similar to the one CrazyCoder suggested.

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