Search code examples
jenkinspipelinecobertura

Jenkins pipeline cannot publish Cobertura report


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.

enter image description here

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!


Solution

  • I found the solution. The Cobertura plugin version was lower than required, I upgraded it to 1.17 and it resolved the issue.