gitlab-ci.yml 中的“git clone project2"? [英] `git clone project2` in gitlab-ci.yml?
本文介绍了gitlab-ci.yml 中的“git clone project2"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I'd like Gitlab CI to fetch source code of another project. Is there a better way than adding a read-only deploy key and setting it up in .gitlab-ci.yml?
解决方案
You can also use GIT SUBMODULES within your project A to refer to project B and then add
GIT_SUBMODULE_STRATEGY: recursive
to the gitlab-ci.yml file in project A.
This also enables you to specifically include a specific branch or commit from your subproject.
https://docs.gitlab.com/ce/ci/git_submodules.html
这篇关于gitlab-ci.yml 中的“git clone project2"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文