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

前端 未结 1 728
长发绾君心
长发绾君心 2021-01-13 01:40

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条回答
  •  醉梦人生
    2021-01-13 02:00

    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

    0 讨论(0)
提交回复
热议问题