Hey! Has anyone had experience having two code bas...
# ask-community
s
Hey! Has anyone had experience having two code bases/repos (or more) working together as kind of a one unit? What I mean is this: Let’s say you have a Base repo which has the most important/base pipelines. Now team A wants to use some pipeline from Base repo to further develop their own pipeline logic. And then team B would like to do the same and as well develop their own pipeline based on Base repo pipeline. This would keep the code repos clean and every team would be responsible of their own repo. The problem is how would you make sure that when Base repo gets updated then the repos using the Base repo code would also get updated so that they won’t run into an error (e.g asset has been deleted or modified in base branch but the dependant repo is using the old version of Base repo). Would be greatly appreciated if someone has dealt with something similar and would share their experience!
j
You could potentially add the base repo to the other repos as a submodule. https://github.blog/2016-02-01-working-with-submodules/
z
Monorepos 4 lyfe. I thought about this kind of thing for a long time and I wanted to do multi-repo, but came to the conclusion that if multiple repos share the same code and have to coordinate on changes to that shared code, you basically just have a distributed monorepo and keeping things in sync will require a lot of extra coordination. Alternatively, the Earthly build tool can trigger builds contained in external repos. Submodules can be kinda yucky, though they might work for you.
s
Thanks for the input! Yeah, seems like monorepo is the way to go.