我们今天遇到了 Jenkins 的一个奇怪错误。经过调查,我们发现是由于我们删除了SVN中的一些文件,导致Jenkin SVN插件出现问题。
在我调查时,似乎这个错误是已知的,但尚未修复。因此升级到更新的 SVN 插件版本不是解决方案(我们使用的是 Jenkins 1.474)。
我们的临时解决方案是“始终在构建之前结帐”。但这显然非常缓慢,并且对于大型项目需要很多时间。所以我正在寻找一种方法来(至少)在构建后脚本中检测到 SVN 问题,并可能会发送一封电子邮件通知开发人员。
有人对这个有经验么?我对詹金不太熟悉,因此任何帮助或指针将不胜感激。
这是错误日志:
Building in workspace /workspace-directory/workspace
Cleaning up /var/lib/jenkins/jobs/aaa/workspace/.
Deleting /var/lib/jenkins/jobs/aaa/workspace/logs
Deleting /var/lib/jenkins/jobs/aaa/workspace/target
Updating svn://address/trunk@HEAD
U src/main/some_file.java
D src/main/another_file.java
U src/main/other_files.java
ERROR: Failed to update svn://address/trunk@HEAD
org.tmatesoft.svn.core.SVNException: svn: E155017: Checksum mismatch while updating '/var/lib/jenkins/jobs/aaa/workspace/src/main/address/.svn/text-base/StudioSignUpController.java.svn-base'; expected: '39fc987bbeb8cd332e6b94abfb934720', actual: 'e9fa300ee28a2b1e15b2273f4b14ae18'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:85)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:69)
at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.driveEditor(SVNEditModeReader.java:250)
at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.update(SVNRepositoryImpl.java:1503)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.update(SVNUpdateClient16.java:557)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doUpdate(SVNUpdateClient16.java:414)
at org.tmatesoft.svn.core.internal.wc16.SVNUpdateClient16.doUpdate(SVNUpdateClient16.java:324)
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:20)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1221)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:292)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:315)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:295)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:391)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:136)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:144)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:789)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:770)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:753)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:743)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:685)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1245)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1488)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: org.tmatesoft.svn.core.SVNException: svn: E155017: Checksum mismatch while updating '/xxxxx/.svn/text-base/SignUpController.java.svn-base'; expected: '39fc987bbeb8cd332e6b94abfb934720', actual: 'e9fa300ee28a2b1e15b2273f4b14ae18'
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.internal.wc.SVNUpdateEditor15.textDeltaEnd(SVNUpdateEditor15.java:637)
at org.tmatesoft.svn.core.internal.wc.SVNAmbientDepthFilterEditor.textDeltaEnd(SVNAmbientDepthFilterEditor.java:221)
at org.tmatesoft.svn.core.internal.wc.SVNCancellableEditor.textDeltaEnd(SVNCancellableEditor.java:130)
at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.processCommand(SVNEditModeReader.java:176)
at org.tmatesoft.svn.core.internal.io.svn.SVNEditModeReader.driveEditor(SVNEditModeReader.java:232)
... 29 more
Caused by: svn: E155017: Checksum mismatch while updating '/xxxx/.svn/text-base/SignUpController.java.svn-base'; expected: '39fc987bbeb8cd332e6b94abfb934720', actual: 'e9fa300ee28a2b1e15b2273f4b14ae18'
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:189)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:141)
at org.tmatesoft.svn.core.internal.wc.SVNUpdateEditor15.textDeltaEnd(SVNUpdateEditor15.java:634)
... 33 more
no change for svn://some_address/trunk since the previous build
No emails were triggered.