jenkins pipeline+pytest+allure報 "Can not find any allure commandline installation"解決辦法


報錯信息:
Error when executing always post condition: ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not find any allure commandline installation. at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.getCommandline(AllureReportPublisher.java:
349) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:303) at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

 

問題描述:

windows下,報錯截圖如上:

 

該類問題一般都是allure環境沒有配置好,

一、首先檢查本地是否已安裝了allure

檢查辦法:cmd命令行下,輸入:

allure --version

  如下圖說明已安裝了,沒有安裝的,pip安裝一下即可:pip install allure

 

 

 二、jenkins下是否已安裝了allure,安裝步驟如下:

  1.系統管理 - > go to plugin manager,如下圖:

  

 

 

   

 

 

 

 

三、檢查Jenkins全局工具配置中,Allure Commandline是否做了配置,是的,你沒看錯,Jenkins安裝了allure插件,這里還是需要配置一下,不然就會報上述錯五,本人碰到的就是這類情況,操作如下:

  選擇 “系統管理” ->全局工具配置,配置如下:

 

 然后再跑一遍jenkins pipeline job就跑成功了。

 

如果不足之處歡迎指正,共同學習進步~


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM