Using Git Submodules in GitLab CI/CD Pipelines

Git Submodules allow me to keep a git repository as a sub-directory in another git repository. This let me clone another repository into my project and keep sources in and libraries/SDKs in sync.

This can be a challenge if using CI/CD runners. They have to clone the repositories in a recursive way. It gets more complex if the sub-modules are not public. Because the CI/CD runner does not have access rights to the non-public repositories.

GitLab CI/CD Pipeline with successful private submodule usage

In this article I explain how I’m using git sub-modules in my CI/CD GitLab pipeline, both for public and private repositories

Continue reading