当仅在合并请求中运行时,如何在.gitlab-ci.yml中正确写入作业?
test_c:
stage: test
script:
- echo "This job tests something. It will only run when all jobs in the"
- echo "build stage are complete."
only:
- merge_requests
此作业不在合并请求中运行,但在主服务器或开发服务器中未运行且处于粉碎状态。
答案 0 :(得分:1)
您的代码正确,请先将其提交给master,然后再测试您的merge_request管道。
答案 1 :(得分:0)
Gitlab文档建议使用“规则”而不是“仅”。您可以通过执行以下操作仅完成merge_requests:
// @grant GM_xmlhttpRequest