Planning to use a monorepo to structure your Go codes but not quite keen on the complexity of Bazel? You might want to check out:
This is an example of a golang-based monorepo. It has the following features:
- Only build the services or cmds that are modified in a commit;
- Build all services and/or cmds that are affected by changes in common codes (i.e.
- Build all services and/or cmds that are affected by changes in
At the moment, CI is setup to use Go 1.14[.x] with
GOFLAGS=-mod=vendor environment variables enabled during build. See sample dockerfile for more details.
How does it work
During CI builds, build.sh iterates the updated files within the commit range (
CIRCLE_COMPARE_URL environment variable in CircleCI) or the modified files within a single commit (when the value is not a valid…
It uses Bash scripts, Makefiles, and the go tools to determine what binaries to build based on commit changes. You might find this useful.