Issue
The pipeline, which uses the tool
step, started failing with the following error.
Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: a2e78a6d-6375-49dd-9ee3-c5a3e3d0520f java.lang.NullPointerException at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:155) at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:138) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) 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 java.base/java.lang.Thread.run(Thread.java:829)
Environment
-
Pipeline: Basic Steps plugin before version
1049.v257a_e6b_30fb_d
Resolution
Tool installations require the name to be used by the tool
step and other features. However, submitting the Tools page without providing all the names is possible. Before version 1049.v257a_e6b_30fb_d
of "Pipeline: Basic Steps plugin", such misconfiguration can cause tool
step to fail NullPointerException
. Leaving the name empty for tools provided by the following two plugins is most likely to cause this issue: SonarQube Scanner and Allure.
Updating the "Pipeline: Basic Steps" plugin to 1049.v257a_e6b_30fb_d
or newer will prevent NullPointerException
, however, the root cause is the unusable tool installations missing the names. Hence, the solution is ensuring every installation on the Tools page has a name.