我在包含gitlab-runner
的存储库的根目录中使用sudo gitlab-runner exec docker [job name]
本地.gitlab-ci.yml
。是否可以从.gitlab-ci.yml
以外的其他文件中读取运行器配置?
我知道我可以在同一.gitlab-ci.yml
的不同作业中管理不同的配置。
我知道gitlab-runner exec
已被弃用,只计划替换它,但尚未实现(详见https://gitlab.com/gitlab-org/gitlab-runner/issues/2797),所以我感谢您的建议关于继任者。
我使用名为a
的YAML创建https://gitlab.com/krichter/gitlab-runner-local-different-name,其中包含" Hello world" - echo
在main
这个名为a
的作业中。 d喜欢在不需要将.gitlab-ci.yml
重命名为sudo gitlab-runner exec docker main --env CI_CONFIG_PATH=a
的情况下作为示例运行。
由于
而使WARNING: Since GitLab Runner 10.0 this command is marked as DEPRECATED and will be removed in one of upcoming releases
fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
FATAL: open .gitlab-ci.yml: no such file or directory
运行失败
https://github.com/barteksc/AndroidPdfViewerV1
答案 0 :(得分:3)
确实不能,.gitlab-ci.yml
是用gitlab-runner exec
代码硬编码的。我已经创建了issue about this problem,如果它仍然与您相关,请对其进行投票。