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

SonarQube Scanner fails while accessing workspace folder after cleanup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • sonar-plugin
    • None

      After upgrading to version 2.17. Pipeline using sonar plugin fails with the following stacktrace (assuming the name of the project is project and the Jenkins workspace folder is /jenkins/workspace.) Note: the pipeline use deleteDir as post/cleanup action.

      /jenkins/workspace/project does not exist.
      	at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:512)
      	at hudson.plugins.sonar.utils.SonarUtils.find(SonarUtils.java:130)
      	at hudson.plugins.sonar.utils.SonarUtils.extractReportTask(SonarUtils.java:102)
      	at hudson.plugins.sonar.utils.SonarUtils.addBuildInfoTo(SonarUtils.java:160)
      	at hudson.plugins.sonar.SonarBuildWrapper$AddBuildInfo.tearDown(SonarBuildWrapper.java:217)
      	at org.jenkinsci.plugins.workflow.steps.CoreWrapperStep$Callback.finished(CoreWrapperStep.java:207)
      	at org.jenkinsci.plugins.workflow.steps.CoreWrapperStep$Execution2$Callback2.finished(CoreWrapperStep.java:150)
      	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(GeneralNonBlockingStepExecution.java:140)
      	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:840) 

      Downgrading the plugin to version 2.16.1 fixes the issue.

            sonarteam Sonar Team
            grossedouceur Hugues Chabot
            Votes:
            10 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: