[英]How do I set up a TeamCity VCS label (SVN) when using a checkout rule?
How do I label my SVN project with TeamCity VCS labeling if I am using a checkout rule?如果我使用结帐规则,如何使用 TeamCity VCS 标签标记我的 SVN 项目?
I read the checkout rule docs, but I'm having a hard time understanding the relationship between VCS labeling and checkout rules in TeamCity.我阅读了结帐规则文档,但我很难理解 TeamCity 中 VCS 标签和结帐规则之间的关系。
My SVN structure looks like:我的 SVN 结构如下所示:
https://my.internalsvn.com/(...)/myproject/branches/gattaca-dev
https://my.internalsvn.com/(...)/myproject/tags
https://my.internalsvn.com/(...)/myproject/trunk
In TeamCity, my VCS root is configured to:在 TeamCity 中,我的 VCS 根配置为:
https://my.internalsvn.com/(...)/myproject
When I run the build, I want it to be executed in the current working directory, so I set up a Checkout Rule that looks like:当我运行构建时,我希望它在当前工作目录中执行,因此我设置了一个 Checkout Rule,如下所示:
+:branches/gattaca-dev => .
When I add the VCS Labeling build feature, it tells me:当我添加 VCS 标签构建功能时,它告诉我:
Failed: Failed to set label 'build-6': No labeling rules found for checkout rules branches/gattaca-dev=>失败:无法设置标签“build-6”:未找到结帐规则分支/gattaca-dev=>的标签规则
What do I have to set so that the branch I am building (which is configured to "." from the checkout rule) gets tagged?我必须设置什么才能标记我正在构建的分支(从结帐规则配置为“.”)?
https://my.internalsvn.com/(...)/myproject/tags/build-6
How do I set the labeling rule for a checkout rule?如何为结帐规则设置标签规则? Does it go in the checkout rule itself?它是否包含在结帐规则中? Or do I need to edit the VCS root and make a copy for this specific build?或者我是否需要编辑 VCS 根目录并为此特定版本制作副本?
I was able to make it work by using a %vcsBranch% parameter.我能够通过使用%vcsBranch%参数使其工作。
The labeling setting on my VCS root becomes:我的 VCS 根上的标签设置变为:
%vcsBranch%=>tags
...and my Checkout Rule becomes: ...我的结帐规则变为:
+:%vcsBranch% => .
I'm not sure whether this is the best solution.我不确定这是否是最好的解决方案。 I would've liked to be able to set up custom labeling rules just for this Checkout Rule, rather than hard-coding it in the VCS root.我希望能够仅为此 Checkout Rule 设置自定义标签规则,而不是在 VCS 根目录中对其进行硬编码。 I couldn't figure out how to do that.我不知道该怎么做。
Additional feedback is welcome.欢迎提供更多反馈。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.