本地unbuntu安装allure碰到一个坑,手动配置好了allure也可以生成报告,到了jenkins上面就一直报404,控制台输出的错误如下
=================== 2 failed, 4 passed, 3 warnings in 4.14s ==================== ERROR: Build step failed with exception java.lang.NullPointerException 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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755) at hudson.model.Build$BuildExecution.post2(Build.java:178) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699) at hudson.model.Run.execute(Run.java:1913) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:99) at hudson.model.Executor.run(Executor.java:431) Build step 'Allure Report' marked build as failure Finished: FAILURE
最后删掉手动安装的allure的链接,从jenkins的:系统管理-全局工具配置-allure commandline
手动配置好别名和版本,再次构建,注意这里,构建的时候allure就会自动安装,不是在点保存后安装
Unpacking https://repo1.maven.org/maven2/io/qameta/allure/allure-commandline/2.16.0/allure-commandline-2.16.0.zip to /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure on Jenkins [autotest_daily] $ /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure/bin/allure generate /var/lib/jenkins/workspace/autotest_daily/pytestdemo/temp -c -o /var/lib/jenkins/workspace/autotest_daily/allure-report
后面构建就正常了,真是弄巧成拙,找了半天也没找到解决方法。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)