我运行此命令的作业:
- rebot -d ./output/$CI_COMMIT_SHORT_SHA
--doc "Report Testing Stage on execution summit ID $CI_COMMIT_SHA"
--output testing-stage.xml
--log log-testing-stage.html
--report report-testing-stage.html
./output/$CI_COMMIT_SHORT_SHA/*.xml
输出报告错误:作业失败:退出状态1Loggin错误
请告诉我如何使作业成功运行。感谢
在gitlab-ci
作业的script
部分中,添加一个echo
以确保GitLab变量确实被替换为正确的值(请参见此线程以获取说明(
stage: info
script:
- echo ${CI_COMMIT_SHA}
- echo ${CI_COMMIT_SHORT_SHA}
- rebot -d ./output/${CI_COMMIT_SHORT_SHA}
--doc "Report Testing Stage on execution summit ID ${CI_COMMIT_SHA}"
--output testing-stage.xml
--log log-testing-stage.html
--report report-testing-stage.html
./output/${CI_COMMIT_SHORT_SHA}/*.xml
使用${var}
形式而不是$var
。
最后,检查日志log-testing-stage.html
的内容是否有任何线索。