How to Speed up Gitlab Build Process - Docker & Yarn/Lerna

357 Views Asked by At

We have a monorepo where there are different packages and out of which some will get deployed on containers.

We have gitlab for the CI where initially the build and test phase is done on 1 runner then we create containers of the packages. Now the problem is that we have to do Yarn install multiple times which makes our CI process very slow.

  1. Yarn build is done to do the 1st phase of build and test
  2. Every container requires Yarn install - total 9 of them which means yarn installs and links all the dependencies 9 times although in parallel but still takes 15min to complete this step

I was trying the option of local cacheing but in gitlab it works better if all the stages are on the same runner we don't have that case with us.

Any suggestions ?

Thanks

0

There are 0 best solutions below