问题描述
我正在设置 TeamCity,我想知道应该将什么用作 VCS 根.
I am setting up TeamCity and I am wondering what should be used as the VCS Root.
我的 svn 存储库位于 http://obfuscatedserver/svn/main/MyProject1/
My svn repository is located at http://obfuscatedserver/svn/main/MyProject1/
我应该将 VCS Root 设置在 http://obfuscatedserver/svn/main/MyProject1/或使用 http://obfuscatedserver/svn/main/MyProject1/trunk/ 的主干文件夹?
Should I set the VCS Root at http://obfuscatedserver/svn/main/MyProject1/ or use the trunk folder at http://obfuscatedserver/svn/main/MyProject1/trunk/ ?
现在我不使用trunk文件夹,我不得不将Build Runner的Build file path"设置设置为trunk/MyProject1.proj"(使用msbuild).
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).
哪个位置合适?
推荐答案
我会推荐使用 http://obfuscatedserver/svn/main/ 作为 VCS Root,然后使用签出规则限制哪些文件夹被签出.
I would recommend using http://obfuscatedserver/svn/main/ as the VCS Root, and then restricting which folders are checked out using checkout rules.
添加以下检出规则(构建配置的第 2 部分):
Add the following checkout rules (section 2 of the build config):
+:/MyProject1/trunk
您可能还需要将 msbuild 文件的位置更新为
You will probably also need to update the location of your msbuild file to
MyProject1/trunk/MyProject1.proj
并将工作目录设置为
MyProject1/trunk
这看起来确实需要做很多工作,但是下次您想要添加新构建时,您不必创建新的 VCSroot.
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.
但是,当 TeamCity 轮询您的 SVN 存储库时,真正的好处就出现了.轮询您的存储库一次将发现所有构建的所有更改.如果您的存储库托管在诸如 sourceforge 或 googlecode 之类的地方,这一点尤其重要.您当然不想为您配置的每个构建轮询他们的服务器.
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.
此外,如果您的 repo 由第三方托管,您可能希望将 vcsRoot 的检查间隔设置为每小时一次或类似.如果您不想等待一个小时过去,您可以随时要求 teamcity 从任何构建概览页面上的操作菜单中检查待处理的更改.
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.
这篇关于我应该将 TeamCity 的 VCS 根指向哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!