TeamCity - SVN 和标签:如何正确执行?

发布于 2024-10-27 08:33:42 字数 3084 浏览 5 评论 0原文

我已阅读 SO 中的所有 TeamCity、SVN 和标签问题,但没有任何接缝适用于我的具体问题。

这里,我们在 SVN 上有以下结构:

svn://server/root
              /projectA
                 /trunk
                 /tags
              /projectB
                 /trunk
                 /tags

在 TeamCity 上,我为项目 A 配置了 SVN 根,如下所示:

svn://server/root/ProjectA/trunk

构建过程非常顺利。

但是现在我想添加标签,但甚至设置文档中指定的标签规则或我知道的任何其他设置,就我最近的尝试而言:

/ProjectA/trunk=>/ProjectA/tags

我收到以下错误:

jetbrains.buildServer.vcs.VcsException: Labeling the path 'ProjectA/trunk' to 'ProjectA/tags/build-24' has failed with the error: svn: CHECKOUT of '/svn/root/!svn/ver/5792/ProjectA/tags': 403 Forbidden (https://server:8443)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.throwLabelingError(SvnSupport.java:430)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.label(SvnSupport.java:418)
  at jetbrains.buildServer.vcs.impl.VcsLabeler.setLabel(VcsLabeler.java:45)
  at jetbrains.buildServer.vcs.impl.VcsLabeler.access$400(VcsLabeler.java:64)
  at jetbrains.buildServer.vcs.impl.VcsLabeler$3$1.run(VcsLabeler.java:4)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
Caused by: org.tmatesoft.svn.core.SVNAuthenticationException: svn: CHECKOUT of '/svn/root/!svn/ver/5792/ProjectA/tags': 403 Forbidden (https://server:8443)
  at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:62)
  at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
  at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:623)
  at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:274)
  at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:262)
  at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doCheckout(DAVConnection.java:452)
  at org.tmatesoft.svn.core.internal.io.dav.DAVCommitEditor.checkoutResource(DAVCommitEditor.java:468)
  at org.tmatesoft.svn.core.internal.io.dav.DAVCommitEditor.addDir(DAVCommitEditor.java:136)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnCopyHelper$CopyCommitPathHandler.handleCommitPath(SvnCopyHelper.java:138)
  at org.tmatesoft.svn.core.internal.wc.SVNCommitUtil.driveCommitEditor(SVNCommitUtil.java:139)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnCopyHelper.doCopy(SvnCopyHelper.java:102)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.label(SvnConnection.java:861)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.label(SvnSupport.java:416)

是否有人有任何原因导致这种情况发生,或者如何我可以正确设置吗?

及时:访问 SVN 的用户可以正确执行签出,因为 TeamCity 配置为在每次构建之前清理签出文件夹。

I've read all the TeamCity, SVN and labeling questions in S.O. but none seams to apply to my specific problem.

Here we have the following structure on the SVN:

svn://server/root
              /projectA
                 /trunk
                 /tags
              /projectB
                 /trunk
                 /tags

On the TeamCity I've configured a SVN root for the project A like this:

svn://server/root/ProjectA/trunk

And the build process works like a charm.

However now I want to add labeling, but even setting the labeling rules as specified in the documentation or any other setting I know of, as for my latest try:

/ProjectA/trunk=>/ProjectA/tags

I get the following error:

jetbrains.buildServer.vcs.VcsException: Labeling the path 'ProjectA/trunk' to 'ProjectA/tags/build-24' has failed with the error: svn: CHECKOUT of '/svn/root/!svn/ver/5792/ProjectA/tags': 403 Forbidden (https://server:8443)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.throwLabelingError(SvnSupport.java:430)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.label(SvnSupport.java:418)
  at jetbrains.buildServer.vcs.impl.VcsLabeler.setLabel(VcsLabeler.java:45)
  at jetbrains.buildServer.vcs.impl.VcsLabeler.access$400(VcsLabeler.java:64)
  at jetbrains.buildServer.vcs.impl.VcsLabeler$3$1.run(VcsLabeler.java:4)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
Caused by: org.tmatesoft.svn.core.SVNAuthenticationException: svn: CHECKOUT of '/svn/root/!svn/ver/5792/ProjectA/tags': 403 Forbidden (https://server:8443)
  at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:62)
  at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
  at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:623)
  at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:274)
  at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:262)
  at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doCheckout(DAVConnection.java:452)
  at org.tmatesoft.svn.core.internal.io.dav.DAVCommitEditor.checkoutResource(DAVCommitEditor.java:468)
  at org.tmatesoft.svn.core.internal.io.dav.DAVCommitEditor.addDir(DAVCommitEditor.java:136)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnCopyHelper$CopyCommitPathHandler.handleCommitPath(SvnCopyHelper.java:138)
  at org.tmatesoft.svn.core.internal.wc.SVNCommitUtil.driveCommitEditor(SVNCommitUtil.java:139)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnCopyHelper.doCopy(SvnCopyHelper.java:102)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.label(SvnConnection.java:861)
  at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.label(SvnSupport.java:416)

Does anyone has any reason why this happen, or how can I set up this correctly?

In time: The user accessing the SVN does the checkout correctly as the TeamCity is configured to clean the checkout folder before every build.

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

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

发布评论

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

评论(1

顾冷 2024-11-03 08:33:42

我会将根设置为:

      svn://server/root/ProjectA

并将标签设置为:

      trunk=>tags

这就是我设置 VCS 的方式。 SVN 错误问题在此处得到了解决。
尝试一下。

I would set the root like:

      svn://server/root/ProjectA

And have labeling as :

      trunk=>tags

That's how I have my VCS set up. The SVN error issue is kinda addressed here.
Give it a try.

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