Best Practices Deploying Multiple Applications from a Single Repository

Repository Structure

I’ve currently got a repository structure for a multi-module gradle project that looks like:

  • models
  • core
  • deployable-a
  • deployable-b

Problem Statement

I want to be able to kick off the builds for the deployables in parallel, but manage them independently.
By “independently” I mean, I don’t want to have to couple the deployments, so I can promote/rollback deployable-a separately from deployable-b.

Since both of the deployables require the models and core dependencies to be published prior, is this an advisable use case?

Planned Approach

What I am planning to do is to have a pipeline that builds + publishes the core, and then calls build on each of the deployables, which will have their own pipeline(s).

Alternatives

Break apart mono repo into 1 deployable : 1 repo


Any feedback would be greatly appreciated!

Is that a maven/gradle project?

Yes, this is a gradle project.

It sounds like models and core are just dependencies used both by dep1 and dep2.
I would create 3 different repositories: models & core, dep1 and dep2. It keeps things easy to manage, unless you have a specific requirement to keep everything in the same repo.
You can configure Jenkins to trigger downstream pipelines when a new SNAPSHOT dependency for models & core is built.

Yeah, that is my alternative approach.
I was investigating the feasibility of housing them all in a single repository.

Mainly due to the tight coupling between the deployables + the model changes (which occur quite frequently). So the owning team wanted more “assurance” that they are always deploying both applications whenever the models change.