Skip to content

opicaud/monorepo

Repository files navigation

monorepo

Start with monorepo

  1. Clone the repository
  2. Install bazel
  3. Build with bazel build //...

Goal

Providing a technical way to enhance collaboration within a team or within multi-team by implementing a monorepo.

Constraints

  • build should be agnostic from plaforms and architecture to ensure reproductible build
  • 0 extra tools should be necessary to enhance fast collaboration and onboarding within teams
  • build/test/relase should take less than 10 minutes to provide fast feedback to the team

Currently

  • build has been succesfully ran on macos-darwin64 and linux-amd64 platforms
  • no extra tools needs to be installed to build (a part from Bazel of course)
  • the build is taking around 10 minutes, the most difficult part is to ensure cache usages (a part the first build)
  • the monorepo is releasing rules_pact

Stats

#Build Cache Time Build type Cache time
#133 No 32m18s Build from scratch 0%
#134 Yes 4m50 Patch changes 50%
  • Patch changes are defined by changes that did not trigger any new releases of any components of the monorepo
  • Cache time is defined by the proportion of time to fetch the cache over the total time of the build

Story

shape-app is sending events about area calculation to eventstore-app, two grpc monorepo components deployed via helm charts. Their collaboration and integration is tested via Pact during the build, thanks to a mononorepo component called pact-helper Each monorepo components are released via a Bazel macro called release_me() such as OCI images are also tagged and pushed during the release process Also, Helm charts are components and are also released each time a new image or a update is made in their manifests In the end, the updated apps folder is used as an input to a GitOps platform in order to be deployed

Next objective

  • Migrate to Bazel 6 with bzlmod
  • Provide a cli for shape-app

Thanks :