-
Bug
-
Resolution: Fixed
-
Blocker
-
None
-
Windows 2016
jenkins 2.204.2
-
-
workflow-basic-steps-1049.v257a_e6b_30fb_d
Summary
Automatic tool installation for SonarQube Scanner fails with
java.lang.NullPointerException at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:150) at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
Details
I have the following tool configuration for SonarQube Scanner under "Global Tool Configuration"
- Name: SonarQube Scanner
- [x] Install automatically: Extract .zip/.tar.gz
- label: ""
- Download URL for binary archive: "https://generic.intra/remote-generic-sonarsource/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip"
- Subdirectory of extracted archive: sonar-scanner-4.3.0.2102
I call the automatic tool installation as follows:
def scannerName = "SonarQube Scanner" def sqScannerHome try { sqScannerHome = tool scannerName } catch(Exception ex) { echo "[ERROR] Problem installing '${scannerName}'\n${ex}" throw ex }
This call ends in the following error
java.lang.NullPointerException at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:150) at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
This worked so I suspected one of the plugin updates broke it so I've tried the current versions, and the previous versions of these plugins:
Pipeline: API | 2.40 | 2.39 |
Pipeline: Basic Steps | 2.19 | 2.18 |
SonarQube Scanner | 2.11 | 2.10 |