{"repo":"flowerinthenight/golang-monorepo","free":true,"listed":false,"github":"https://github.com/flowerinthenight/golang-monorepo","clone":"git clone https://github.com/flowerinthenight/golang-monorepo.git","description":"An example of a golang-based monorepo.","language":"Shell","stars":404,"topics":["golang","go","monorepo","monorepository","makefile","bash","docker"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"GitHub Actions CircleCI :----- :------ (This repo is mirrored to https://codeberg.org/flowerinthenight/golang-monorepo). Overview 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. internal ); - Build all services and/or cmds that are affected by changes in vendor codes. For now, CircleCI 2.1 and GitHub Actions are supported. But since it uses bash scripts and Makefiles, it should be fairly straightforward to port to TravisCI or AppVeyor, etc. At the moment, CI is setup with GO111MODULE=on and GOFLAGS=-mod=vendor environment variables enabled during build. See sample dockerfile.samplesvc 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 range), excluding hidden files, internal , and vendor folders. It will then try to walk up the directory path until it can find a Makefile (excluding root Makefile ). Once found, the root Makefile will include that Makefile and call the custom rule as target, thus, initiating the build. When the changes belong to either internal or vendor , the script will then try to determine the services (and cmds) that have dependencies using the go list command. All dependent services will th","default_branch":null,"files":null,"tree":[],"storefront":"/r/flowerinthenight","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/flowerinthenight/golang-monorepo/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}