Hi,
I am (also) trying to understand the difference between Composite Builds and Multi-Projects Build. I am particularly interested in maintaining a mono-repo, which produces multiple services, i.e., docker images. Moreover, I would like to understand, how do best versioning of the generated services, i.e., docker images, i.e., git tag of the repository vs. versions of images (probably not the context of gradle?).
Basically, my monorepo looks like
monorepo
|-- lib/
|-- proto/
|-- service/
|-- foo/ // depends on proto/
|-- bar/ // depends on proto/ and lib/
The lib/ contains the domain-logic and proto/ the gRPC API, i.e., auto-generated java classes from proto files, we already discussed this here and there. ![]()
As can be seen in the layout, I have two services (might become more), which depend on lib/ (domain-logic) or both lib/ and proto/ (gRPC API).
Consequently, I need the files (output?) of those other directories for compilation and finally, want to build Docker images. We are using Bitbucket pipelines, i.e., I don’t know where to draw the line between gradle and Bitbucket. But I assume, each service-folder needs its own Dockerfile?
And finally, what is the best practice to do versioning for the produces artefacts (Docker images)? Shall each artefact simply has the git tag of the whole monorepo, even if a service might not be affected?
Yes, it is much. I just would like to know how to sort things out and where to look for my issues. ![]()
Thanks in advance and best, patient-coder.
EDIT
Okay, seems to me I require autonomous builds for the services, i.e., composite build is my choice then?