配置 TeamCity 以从 SVN 主干、分支和/或标签进行构建
如何配置 TeamCity 从 SVN 主干以及不同的分支和/或标签进行构建?
我们的想法是从同一个项目进行多个构建,这样我们就可以拥有生产中的当前版本(能够在“发布标签”上进行部署和修复),同时拥有主干和分支与每天发生的实际发展相结合。
我们有我们的 SVN 目录的策略、所有者和所有这些,我们遇到的问题是如何配置 TeamCity 以便在应用程序的不同“版本”或“状态”上为同一项目进行多个构建。
最好的方法是什么?
提前致谢 !
How can I configure TeamCity to build from SVN trunk and also from different branches and/or tags ?
Our idea is to have multiple builds from the same project, this way we can have the current version that is in production (with the ability to make deploys and fixes over that "release tag") and at the same time have the trunk and branches with the actual development that is taking place daily.
We have our policies, owner and all that for our SVN directories, the problem that we have is how to configure TeamCity to make multiple builds for the same project over the different "versions" or "states" of the application.
What is the best way to do this ?
Thanks in advance !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,确保您的 VCS 根目录是管理面板中 SVN 存储库的根目录,而不是指向 trunk 目录。
然后,对于每个构建配置,在 VCS 配置中编辑签出规则。添加您想要的结帐规则。
例如,对于您的“trunk”构建配置,您将有一个签出规则:
+:trunk => .
。如果您有要构建的标签或分支,只需使用相应的签出规则创建一个新的构建配置即可。 “release-1.1”标签的签出规则为:
+:tags/release-1.1 => .
以下是有关结账规则的文档:http://confluence. jetbrains.net/display/TCD65/VCS+Checkout+Rules
First, ensure your VCS root is the root of your SVN repository in your administration panel, instead of being pointed to the trunk directory.
Then, for each build configuration, edit the checkout rules in your VCS Configuration. Add the checkout rule you desire.
For example, for your 'trunk' build configuraton, you would have a checkout rule of:
+:trunk => .
.If you have a tag or branch you want to build, just create a new build config with a corresponding checkout rule. A tag of 'release-1.1' would have a checkout rule of:
+:tags/release-1.1 => .
Here is the documentation on checkout rules: http://confluence.jetbrains.net/display/TCD65/VCS+Checkout+Rules
我在 TeamCity 中的 SVN 上遇到了类似的问题,为了允许使用多个分支,我使用配置参数来传递“分支”,因为 TeamCity 不支持 SVN 的多分支。
并设置触发器以从该分支开始构建:
所以在项目中它看起来像:
I had similar problem with SVN in TeamCity and to allow work with multiple branches I used Configuration parameter to pass "branch" since TeamCity doesn't support multibranch for SVN.
And set trigger to start build from that branch:
So in project it looks like: