问题前置: 工作时进行新环境jenkins pipeline编写时,需要用到allure报告模块 已经安装了allure report插件 宿主机上也安装了allure,并配置了环境变量(allure --version可以看到内容) 问题: 执行jenkins后,出现下面的日志报错 Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 3a645f64-3621-4809-a01f-7e96a4dd3797 java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getName()" is null 解决问题: jenkins - 系统管理 - 全局工具配置,进行了allure相关配置 问题报错详细: [Pipeline] allure [Pipeline] } [Pipeline] // script Error when executing always post condition: Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 3a645f64-3621-4809-a01f-7e96a4dd3797 java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getName()" is null at ru.yandex.qatools.allure.jenkins.AllureReportPublisherDescriptor.getCommandlineInstallation(AllureReportPublisherDescriptor.java:112) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.getCommandline(AllureReportPublisher.java:346) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:303) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 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:833) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 3a645f64-3621-4809-a01f-7e96a4dd3797 java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getName()" is null at ru.yandex.qatools.allure.jenkins.AllureReportPublisherDescriptor.getCommandlineInstallation(AllureReportPublisherDescriptor.java:112) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.getCommandline(AllureReportPublisher.java:346) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:303) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 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:833) Finished: FAILURE