持续交付 mac 上构建 Jenkins+allure 报告时,一直报错

· 2020年08月25日 · 最后由 回复于 2020年09月02日 · 4632 次阅读

背景描述:
1、主服务 Jenkins 服务器在 Windows 上,从服务 jenkins-Slave 在 mac 上;
现状:
在 mac 上独立使用 pytest test_zbl.py --reruns 3 --alluredir=reports 、allure generate --clean reports 可以生成 allure 报告。

但 Jenkins 上使用 allure 模块,报错,求解。

ERROR: Step ‘Allure Report’ aborted due to exception:
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from bogon/10.200.124.96:59194
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:998)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation.getMajorVersion(AllureCommandlineInstallation.java:58)
at ru.yandex.qatools.allure.jenkins.ReportBuilder.build(ReportBuilder.java:52)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:312)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1905)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
java.io.IOException: Can't find allure commandline
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:63)
at ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation$2.call(AllureCommandlineInstallation.java:58)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:97)
at java.lang.Thread.run(Thread.java:832)
Finished: FAILURE

共收到 2 条回复 时间 点赞
#2 · 2020年09月02日 Author

感谢楼上,问题最终确实是楼上链接的问题。
只是在定位上被绕进去了:
1、Jenkins+pytest+allure 的环境是利用的别的部门的,所以在问题定位时并没有考虑是 Jenkins 主服务上的配置问题;
2、在定位问题时,一直在纠结 ‘hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ’ 这个错,这个错的定位说明又不明显;

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册