`git clone project2` in gitlab-ci.yml?

戏子无情 提交于 2019-12-09 03:18:47

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/44444616/git-clone-project2-in-gitlab-ci-yml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!