当构建主机运行Ubuntu 13.04时,此配置有效。自从使用Jenkins 1.509.2将构建主机升级到Ubuntu 13.10后,Ubuntu 12.04构建从站在归档工件步骤中失败。我在Google上搜索并检查了Debian BTS和Launchpad,但没有发现任何关于此错误的提及。
Archiving artifacts
ERROR: Failed to archive artifacts: **/*
hudson.util.IOException2: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer
at hudson.FilePath.copyRecursiveTo(FilePath.java:1942)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:137)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:802)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:774)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:724)
at hudson.model.Run.execute(Run.java:1600)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer
at hudson.remoting.Channel$4.adapt(Channel.java:704)
at hudson.remoting.Channel$4.adapt(Channel.java:699)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
at hudson.FilePath.copyRecursiveTo(FilePath.java:1940)
... 10 more
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer
at hudson.util.io.TarArchiver.visitSymlink(TarArchiver.java:79)
at hudson.util.DirScanner$Glob.scan(DirScanner.java:126)
at hudson.FilePath.writeToTar(FilePath.java:1978)
at hudson.FilePath.access$1000(FilePath.java:168)
at hudson.FilePath$36.invoke(FilePath.java:1919)
at hudson.FilePath$36.invoke(FilePath.java:1915)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Build step 'Archive the artifacts' changed build result to FAILURE
答案 0 :(得分:0)
我确定只有当工作区包含符号链接时才会发生崩溃。作为一种解决方法,我在jenkins继续存档工作区之前添加了我的("执行shell")构建步骤删除所有符号链接。
#
# Workaround Jenkins bug:
#
# Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuffer
# at hudson.util.io.TarArchiver.visitSymlink(TarArchiver.java:79)
#
find . -type l -print0 | xargs -0 rm -f