我可以在 TeamCity 构建中指定要签出的修订版本吗?
有没有办法指定在 TeamCity 构建中签出哪个 SVN 版本?
如果我尝试更改 SVN URL 以包含使用 @ 符号的修订版本,例如。
svn+ssh://svn/some/url@1234
然后我收到错误(“未知路径类型”)。
我搜索了所有 TeamCity 文档,但找不到任何合适的内容。
这个问题的背景是,我想对特定版本运行测试,但由于某种原因,过去没有进行过测试(例如,当时的 URL 不在 TeamCity 中)。
Is there a way to specify which SVN revision to checkout in a TeamCity build?
If I attempt to change the SVN URL to include the revision using the @ notation, eg.
svn+ssh://svn/some/url@1234
then I get an error ("Unknown path kind").
I've searched all TeamCity documentation and can find nothing appropriate.
The background to this question is that I would like to run tests on a particular revision that for some reason was not done in the past (eg. the URL was not in TeamCity at the time).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,只需点击“运行”按钮旁边的省略号即可触发 自定义构建并从结果屏幕中的“要包含的最后更改”列表中选择修订版本。但是 - 您只能从构建之前运行过的修订版本中进行选择。
不幸的是,唯一的其他选择是针对要运行的修订版本的标签创建一个单独的 VCS 根来执行此操作。不优雅,但有效。
Yes, just hit the ellipses next to the "Run" button to trigger a custom build and choose the revision from the "Last change to include" list in the resultant screen. BUT - you can only choose from revisions which the build has previously run.
Unfortunately the only other option is to create a separate VCS root against a tag of the revision you want to run to do this. Not elegant, but it works.
对于git来说,有这样的解决方案。我不确定它在 svn 上如何工作。
有一种方法可以让 TeamCity 在“自定义构建”对话框(通过单击“运行”按钮旁边的省略号...打开的对话框)中列出所有分支,包括那些没有尚未建成。
要显示分支,请转到 VCS 根目录,然后设置分支规范。对于 git,它会类似于:
这里的星号
*
是一个占位符,表示在分支下拉列表中显示的内容。请注意,这可能会导致您的配置自动在所有分支上构建 - 因此您可能需要更新构建触发器。
有关更多信息,请参阅有关功能分支的文档。
For git, there is this solution. I'm not sure how it will work for svn.
There is a way to have TeamCity list all branches in the 'custom build' dialog (the one you open by clicking the elipsis ... next to the Run button), including ones that haven't been built yet.
To show the branches, go to your VCS root, and set a branch specification. For git, it will be something like:
The star
*
here is a placeholder for what to show in the branches dropdown.Note that this may cause your configurations to build on all branches automatically - so you may want to update the build triggers.
See the docs about feature branches for more.