英文:
Jenkins pipeline cannot publish Cobertura report
问题
我创建了一个Jenkins流水线,使用Cobertura 1.16插件来处理一些报告,在控制台日志中出现以下错误:
[Cobertura] 发布Cobertura覆盖率报告...
[Cobertura] 发布Cobertura覆盖率结果...
[Cobertura] 找到Cobertura覆盖率报告。
错误:错误:无法将F:\ws\adp\OpenCover_test\nws\root\component\WK.Health.Enterprise.MultiFieldSearchAPI\Managers\ExistenceCheckManager.cs绘制到/jenkins/jobs/ade/jobs/cibs/jobs/STF/jobs/OpenCover_test/cobertura
java.io.IOException: 无法反序列化响应为UserRequest:hudson.FilePath$Mkdirs@249892a: java.lang.SecurityException: 禁止从代理发送hudson.FilePath$Mkdirs到控制器。
请参阅https://www.jenkins.io/redirect/security-144了解更多详细信息
at hudson.remoting.Channel.call(Channel.java:1009)
at hudson.FilePath.act(FilePath.java:1194)
at hudson.FilePath.act(FilePath.java:1183)
at hudson.FilePath.mkdirs(FilePath.java:1374)
at hudson.plugins.cobertura.renderers.SourceCodePainter.paintSourceCode(SourceCodePainter.java:64)
at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:140)
at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:32)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3502)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119)
at java.base/java.lang.Thread.run(Thread.java:829)
当我按照内置链接https://www.jenkins.io/redirect/security-144的说明操作时,我需要在Jenkins服务器本身上勾选正确的复选框,我已经这样做了。
但错误仍然存在。我必须补充一下,我根本没有重新启动Jenkins服务器。
另外,我在想是否需要升级Cobertura插件,因为我使用的是1.16版本,但在执行升级之前我必须确保这一点,因为我不能在这个问题上犯错。
有什么建议吗?
提前感谢!
英文:
I created a Jenkins pipeline that uses Cobertura 1.16 plugin to handle some reports, and the following error pops up in the console log:
[Cobertura] Publishing Cobertura coverage report...
[Cobertura] Publishing Cobertura coverage results...
[Cobertura] Cobertura coverage report found.
ERROR: ERROR: Failure to paint F:\ws\adp\OpenCover_test\nws\root\component\WK.Health.Enterprise.MultiFieldSearchAPI\Managers\ExistenceCheckManager.cs to /jenkins/jobs/ade/jobs/cibs/jobs/STF/jobs/OpenCover_test/cobertura
java.io.IOException: Failed to deserialize response to UserRequest:hudson.FilePath$Mkdirs@249892a: java.lang.SecurityException: Sending hudson.FilePath$Mkdirs from agent to controller is prohibited.
See https://www.jenkins.io/redirect/security-144 for more details
at hudson.remoting.Channel.call(Channel.java:1009)
at hudson.FilePath.act(FilePath.java:1194)
at hudson.FilePath.act(FilePath.java:1183)
at hudson.FilePath.mkdirs(FilePath.java:1374)
at hudson.plugins.cobertura.renderers.SourceCodePainter.paintSourceCode(SourceCodePainter.java:64)
at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:140)
at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:32)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3502)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119)
at java.base/java.lang.Thread.run(Thread.java:829)
Once I follow the built-in link, https://www.jenkins.io/redirect/security-144
I needed to check the proper checkbox on the jenkins server itself, which I did.
But the error still remains. I must add that I didn't restart the jenkins server at all.
Also, I wondered if I have to upgrade the Cobertura plugin, since I use 1.16, but I must be certain of that before I do it, as I cannot afford not to be right on that one.
Any ideas?
Thanks in advance!
答案1
得分: 0
我找到了解决方案。
Cobertura插件版本低于所需版本,我将其升级到1.17,问题得以解决。
英文:
I found the solution.
The Cobertura plugin version was lower than required, I upgraded it to 1.17 and it resolved the issue.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论