zladovan / monorepo

Showcase of how to manage building projects inside monorepo with Gradle as build tool and CircleCI, Bitbucket Pipelines, Travis CI or GitHub Actions as CI tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

local mono-repo build twitter style

deanorderly opened this issue · comments

It can be highly desirable to run the build the EXACT same way as CI. This is a bit hard with all the remote circle CI calls (ie. developer setup is a bit more painful). I don't know a solution yet but I might append here. Basically, with no setup at twitter, we would run the same command that CI runs to make sure if we changed a library for project X, it would ensure we didn't break someone elses project. I didn't really want to look into all the projects depending on the library. I just want to run a command that does it.

hmmm, one idea is IF this project did force master to be clean, then you can simply do this

base=git merge-base master HEAD

which is what I need to do I think instead of calling circleCI api for last hash.

Thinking more on this. The twitter way is a complete paradigm shift the more I think about it in that the mono-repo does not depend on CI. Perhaps closing this would be better as this would completely overhaul everything in this project however if done with just git, it would support all CI's without any CI code in the project which is also nice.

I am hoping we can get gradle to implement something BUT perhaps with a 'git' plugin so they detect the changes.

success, I went the opposite way and hacked circleci.sh into a localgit.sh basically instead so the monobuild can now be run by developers AND is run by CI as well. thanks for the work. IT works great so far!!! I am getting a bit hit by my allergies hard (and this usually takes me out and I lie in bed a few days). I guess a runny nose and pressure is better than covid though.

The original idea of this "project" was not to replace CI, just to find out which CI jobs should be called and call them.

I was already thinking about some local runner too but I didn't start to implement it yet. My idea was to create some special directory inside each project (e.g. ci) which would contain minimally one shell script build.sh. This would be the main build. Then there could be another scripts too. Those scripts could be then called from real CI configs and build.sh will be called from local. Of course it is quite simplistic approach :)

Another idea was to somehow use some already existing solution (e.g. https://github.com/simplesurance/baur).

I would be of course interested in your solution too. Could you share it ?

Btw. really thanks for so much feedback from your side and I wish you getting better soon.