Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN "is not under version control" failure with Jenkins

I have a project in Jenkins that has many SVN repositories to pull from. Whenever I build, the first build after a workspace clean fails with errors like the one below. Without changing anything, the next build will be successful.

If I set the project to always clean the workspace before the build, it will always fail. Each time, with different SVN repositories.

I tried moving to SVN 1.6, tried verifying that the HTTPS certificate is okay, not sure what else to look for?

ERROR: Failed to parse svn info for     https://subversion.assembla.com/svn/<PROJECT NAME HIDDEN>/trunk
org.tmatesoft.svn.core.SVNException: svn:     '/tmp/data/hudson/jobs/Build_ISO/workspace/ch.ethz.ssh2' is not under version control
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
    at org.tmatesoft.svn.core.wc.SVNWCClient$13.handleError(SVNWCClient.java:3314)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.walkEntries(SVNWCAccess.java:758)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.walkEntries(SVNWCAccess.java:741)
at org.tmatesoft.svn.core.wc.SVNWCClient.crawlEntries(SVNWCClient.java:3294)
at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2498)
at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2865)
at hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke(SubversionSCM.java:1023)
at hudson.scm.SubversionSCM$BuildRevisionMapTask.invoke(SubversionSCM.java:1001)
at hudson.FilePath.act(FilePath.java:832)
at hudson.FilePath.act(FilePath.java:814)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:685)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:579)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:468)
at hudson.model.Run.run(Run.java:1410)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: '/tmp/data/hudson/jobs/Build_ISO/workspace/ch.ethz.ssh2' is not under version control
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:163)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:118)
... 17 more
like image 578
Yon Avatar asked Aug 08 '12 20:08

Yon


2 Answers

I know the thread is old and is almost obsolete but that didn't stop from the people like me landing here in search of solution of this popular problem of jenkins. So since now my problem is solved I am posting answer for future use:-

Initial searching gives that problem is due to a bug in some version of SVN plugin, so obvious solution is to change that plugin, the same is pointed out in the links given by @ChrisH. His links were great help. So You can update the svn plugin using following two ways:-

  1. Go to manage plugins and install the update from there.
  2. Download the *.hpi file from this link and place the *.hpi file inside the $JENKINS_HOME/plugins/ folder. If you don't know where $JENKINS_HOME folder is than most chances are it will be a hidden folder in your home directory (for linux).

Once you update the plugin you need to restart the jenkins so that new plugin can take effect.

However if you have downloaded jenkins recently chances are that you don't need to follow above process. Simple go to Manage Jenkins-> Configure System and change the SVN version (to 1.6) from the combo box.

Have fun,

like image 197
Amit Avatar answered Nov 07 '22 05:11

Amit


If you have any svn:externals links in your repository you might be hitting one of these issues:

  • JENKINS-3673
  • JENKINS-11806
like image 34
ChrisH Avatar answered Nov 07 '22 07:11

ChrisH