<p>git submodules couple them tightly but using cicd pipelines you can have option to have different versions based on different branches of each repo. If you have kubernetes cluster ahead you can use argocd to do this for you even graphically.</p>

CC BY-SA 4.0
2021-08-23T04:08:36.333Z
2021-08-23T04:08:36.333Z
Siddique Ahmad
<p>I have gitlab repo ZERO (project) which serves as a code base for multiple websites (repo ONE, TWO, THREE..), these are also gitlab repositories. I am using gitlab CI/CD options, I want to be able to build docker image consisting of code base repo ZERO + specific code in specific website repo, i.e. ONE. Base repo ZERO and project repositories ONE, TWO, THREE will be pushed to regularily.</p>
<p>To me it seems usage of <code>git submodules</code> might be appropriate, but when doing internet research on this matter, <code>submodules</code> is getting hate for being complicated and slow. Are submodules straight solution for this usecase, or is there alternative solution which might suit me better?</p>

<docker><git><gitlab>
Gitlab build from multiple repositories - git submodules
wtdmn
# Gitlab build from multiple repositories - git submodules

(Asked by: username_0 on 2021-08-22)

I have gitlab repo ZERO (project) which serves as a code base for multiple websites (repo ONE, TWO, THREE..), these are also gitlab repositories. I am using gitlab CI/CD options, I want to be able to build docker image consisting of code base repo ZERO + specific code in specific website repo, i.e. ONE. Base repo ZERO and project repositories ONE, TWO, THREE will be pushed to regularily.

To me it seems usage of `git submodules` might be appropriate, but when doing internet research on this matter, `submodules` is getting hate for being complicated and slow. Are submodules straight solution for this usecase, or is there alternative solution which might suit me better?

**Tags:** docker, git, gitlab


---

## 1 answers

### Answer by username_1 on 2021-08-23. Score: 0

git submodules couple them tightly but using cicd pipelines you can have option to have different versions based on different branches of each repo. If you have kubernetes cluster ahead you can use argocd to do this for you even graphically.


---

