Skip to content

Add support for GIT_SUBMODULE_STRATEGY

What does this MR do?

Adds support for a GIT_SUBMODULE_STRATEGY variable which enables initializing submodules during the "get sources" phase.

Why was this MR needed?

See the discussion here: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/101#note_18965117.

Git submodules are a very common way of handling external code. Submodules are officially supported , but require manually adding git submodule update --init in the before_script of .gitlab-ci.yml. For the docker executor, this means the user-specified image must have git installed (which is the whole reason the gitlab/gitlab-runner-helper images exist).

Additionally, automatic certificate injection does not happen. This means that with GitLab using a self-signed cert (or cert from a custom CA), one must manually inject the CA certificate in the before_script.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Closes #101 (closed)

Merge request reports