jenkins pipeline ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getName()

问题前置:
 工作时进行新环境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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值