allure-commandline下载
下载地址:https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/
选择:allure-commandline-2.19.0.zip
linux下安装配置
先安装jdk:allure是一个Java程序,依赖jdk,https://www.cnblogs.com/uncleyong/p/10732951.html
unzip allure-commandline-2.19.0.zip
mv allure-2.19.0/ /usr/local/
vim /etc/profile,下面顺便把需要用到的mvn也配置了
# allure export ALLURE_HOME=/usr/local/allure-2.19.0 export PATH=$ALLURE_HOME/bin:$PATH # maven export MAVEN_HOME=/usr/local/apache-maven-3.6.1 export PATH=$MAVEN_HOME/bin:$PATH
激活配置:source /etc/profile
也可以创建软链接:ln -s /usr/local/allure-2.19.0/bin/allure /usr/bin/allure
mvn创建软链接:ln -s /usr/local/apache-maven-3.6.1/bin/mvn /usr/bin/mvn
配置文件从容器拷贝到虚拟机:docker cp f8a2b3d91455:/usr/local/apache-maven-3.6.1/conf/settings.xml ./
修改镜像地址:vim settings.xml
<mirror> <id>aliyun</id> <mirrorOf>*</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror>
修改后的配置文件拷贝到容器中:docker cp settings.xml f8a2b3d91455:/usr/local/apache-maven-3.6.1/conf/
docker中安装配置
docker cp allure-commandline-2.19.0.zip f8a2b3d91455:/
docker exec -it f8a2b3d91455 /bin/bash
unzip allure-commandline-2.19.0.zip
mv allure-2.19.0/ /usr/local/
容器中没有vi、vim,可以创建软链接
ln -s /usr/local/allure-2.19.0/bin/allure /usr/bin/allure
mvn创建软链接:ln -s /usr/local/apache-maven-3.6.1/bin/mvn /usr/bin/mvn
jenkins中安装allure插件及配置
全局工具配置
效果展示
原文会持续更新,原文地址:https://www.cnblogs.com/uncleyong/p/16726826.html