1.安装 tomacat
    2.将Jenkins.war放到tomacat webapps下
    3.完成Jenkins安装
    4.安装Java jdk配置环境变量(1.8及以上)
    5.安装allure2
    sudo apt-add-repository ppa:qameta/allure
    sudo apt-get update
    sudo apt-get install allure
    查看allure2版本号:allure —version
    6.
    安装python3
    安装pip3 并将pip3软链到python3
    pip3 install pytest
    pip3 install allure-pytest
    pip3 install allure-python-commons
    切换到测试用例所在目录执行
    6.1:
    pytest -v -v 查看是否正常运行
    pytest —alluredir=具体报告文件存放路径 查看是否生成report文件
    6.2:
    在Jenkins中进行项目构建,查看allure是否有报告数据

    6.3如果本地需要生成allure报告文件,执行 allure generate report具体文件路径 -o allure-report的具体文件路径
    6.4如果需要查看生成报告,执行:allure serve /tmp/my_allure_results)

    7.jenkins 插件安装
    Allure Jenkins Plugin
    8.jenkins 全局设置—>Allure Commandline
    9.
    9.1Jenkins 使用自定义的工作空间
    目录:项目存放路径,根目录
    显示名称:任意
    9.2构建:
    执行shell
    cd 测试用例所在目录
    pytest —alluredir=report存放目录
    cd /home/deploy/test_dir/test_cases/back-one/test_collection/
    pytest —alluredir=/home/deploy/test_dir/test_cases/back-one/test_collection/report
    exit 0
    9.3构建后操作
    results:自定义目录已在项目根目录,只需要填写根目录后面的目录即可
    test_collection/reportJenkins自动化环境搭建.pdf