Is running incremental builds on CICD a good idea?
# community-support
v
Is running incremental builds on CICD a good idea?
v
Opinions very much vary on that. Some say it is good because you get faster feedback. Some say it is bad in case the build logic has bugs and thus the incremental build outcome is not reliable. 🤷‍♂️
I personally prefer to not do incremental builds on CI/CD
v
Do the big monorepo folks have a option not to? I always thought its one big build, and changing a single file, will still build everything, but 99% will be UP-TO-DATE due to cache (or FROM-CACHE)
t
That's the expected behavior… …if your build (including all used plugins) correctly configures all inputs/outputs for incremental build
v
yes that what if is what gives me the pause, I haven’t needed to do a clean build locally for a long time, but still for release pipeline Im apprehensive about having it incremental
t
Same approach here: incremental builds "by default", clean builds for releases "just in case"
v
I'm not sure that is the same. At least not same as for me. For me it is incremental during daily work locally, clean "just in case" for any CI/CD build.
v
But imagine spotify or pintrest or slack. Large companies but gigantic like google. Clean CICD run would take hours, no?
v
Depends on what they build. If they build the world, maybe. But even then, they are probably using a remote build cache which should serve most time-intense tasks from cache. With a clean build I do not mean running without build cache.
Also, different situations demand different tactics