Jenkins流水线无法发布Cobertura报告。

huangapple go评论47阅读模式
英文:

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.

Jenkins流水线无法发布Cobertura报告。

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.

huangapple
  • 本文由 发表于 2023年7月10日 21:00:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76654001.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定