3
votes

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.

1
do you really need to label? does not having the svn revision remove the need for labels? Especially when build no ~= revision number?James Woolfenden
@James The point here is that we do have different build configurations and one of them we use to publish to the production environment, so, labeleing the SVN is quite important for us.Paulo Santos

1 Answers

4
votes

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.