Subversion更新失败,詹金斯码头工人管道

时间:2019-09-25 09:45:07

标签: docker jenkins svn

我正在使用SVN(1.8)运行jenkins管道项目,如果管道是新管道,并且正在为管道项目新建工作区文件夹,则一切运行都将顺利进行。

当我尝试再次构建同一管道的第二遍时,出现以下错误:

stacktrace:

org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot create new file '/var/jenkins_home/workspace/pipeline-testing-1/console/wc-content-notification/target/.svn/lock'
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:760)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:910)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:363)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1349)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:847)
    at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.update(SVNUpdateClient16.java:507)
    at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doUpdate(SVNUpdateClient16.java:364)
    at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doUpdate(SVNUpdateClient16.java:274)
    at org.tmatesoft.svn.core.internal.wc2.old.SvnOldUpdate.run(SvnOldUpdate.java:27)
    at org.tmatesoft.svn.core.internal.wc2.old.SvnOldUpdate.run(SvnOldUpdate.java:11)
    at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
    at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
    at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
    at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:311)
    at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:291)
    at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:387)
    at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:160)
    at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
    at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1040)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1016)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:989)
    at hudson.FilePath.act(FilePath.java:1077)
    at hudson.FilePath.act(FilePath.java:1060)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:936)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:863)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
    at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
ERROR: Subversion update failed

svn无法更新,我不知道为什么!!。

我厌倦了在jenkins docker-compose中添加一些java_opts参数,但是没有任何帮助。

我的docker-compose:

version: '3'
services:
    jenkins:
        container_name: jenkins
        image: 'jenkins/docker'
        build:
            context: .
        environment:
            - JAVA_OPTS=-Dhudson.spool-svn=true
        ports:
            - "8090:8080"
        volumes:
            - '$PWD/jenkins_home:/var/jenkins_home'
            - '/var/run/docker.sock:/var/run/docker.sock'
        networks:
            - net
networks:
    net:

临时解决方案;我必须手动删除docker容器中的管道项目文件夹并运行构建,这反过来又要花费大量时间来构建。

0 个答案:

没有答案