Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30646

Bad handling of relative paths

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • cobertura-plugin
    • Windows 7 64 bit
      Jenkins ver. 1.613
      Jenkins Cobertura Plugin 1.9.7
      Java 1.8.0_45-b15

      The issue happens when trying to publish cobertura-coverage.xml report with relative paths i.e.:

      ...
      <sources>
      	<source>C:\Users\myUser\.jenkins\workspace\SomeWorkspaceName\SomeProject\aaa\bbb\ccc\ddd
      </sources>
      ...
      
      ...
      <class name="SomeFile.js" filename="..\..\..\..\..\SomeProject\xxx\yyy\SomeFile.js />
      ...
      

      It's causing below errors:

      16:33:58 ERROR: ERROR: Failure to paint C:\Users\myUser\.jenkins\workspace\SomeWorkspaceName\SomeProject\aaa\bbb\ccc\ddd\..\..\..\..\..\SomeProject\xxx\yyy\SomeFile.js to C:\Users\myUser\.jenkins\jobs\SomeWorkspaceName\cobertura
      16:33:58 java.io.IOException: Failed to mkdirs: C:\Users\SomeProject\xxx\yyy
      16:33:58 	at hudson.FilePath.mkdirs(FilePath.java:1164)
      16:33:58 	at hudson.plugins.cobertura.renderers.SourceCodePainter.paintSourceCode(SourceCodePainter.java:62)
      16:33:58 	at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:135)
      16:33:58 	at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:30)
      16:33:58 	at hudson.FilePath.act(FilePath.java:991)
      16:33:58 	at hudson.FilePath.act(FilePath.java:969)
      16:33:58 	at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:403)
      16:33:58 	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      16:33:58 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      16:33:58 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
      16:33:58 	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      16:33:58 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
      16:33:58 	at hudson.model.Run.execute(Run.java:1769)
      16:33:58 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      16:33:58 	at hudson.model.ResourceController.execute(ResourceController.java:98)
      16:33:58 	at hudson.model.Executor.run(Executor.java:374)
      

      See also related issue on intern github page: https://github.com/theintern/intern/issues/504

            Unassigned Unassigned
            bartoszkaczorek Bartosz Kaczorek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: