请确保运行的用户拥有root权限。
stages: # List of stages for jobs, and their order of execution - build - test - deploy build-job: # This job runs in the build stage, which runs first. stage: test tags: - kunpeng_executor # 对应gitlab-runner注册时的标签,可选择多个 script: - CURDIR=$(pwd) - echo $CURDIR - /bin/cp -rf /root/.local/compatibility_testing/template.html.bak /root/.local/compatibility_testing/template.html - sudo /bin/bash /root/.local/compatibility_testing/bin/compatibility_test//若为root用户执行,请去掉“sudo”命令 - /bin/cp -rf /root/.local/compatibility_testing/compatibility_report.html $CURDIR/compatibility_report.html - echo "请去 '${CURDIR}'/compatibility_report.html 查看报告 " artifacts: paths: - compatibility_report.html name: compatibility_report