Simplify yarn and bundle dependency and cache CI config
While looking into adding --frozen-lockfile
to our yarn install
commands, I realized we had some duplication in the config, as well as some unneeded complexity. In many jobs, we did one of:
- Run
bundle install
in a default-definedbefore_script
, and then bring in the cache config through anextends
addition. - Run
yarn install
and bring in the yarn cache through two separateextends
. - Run either install manually in the script, and bring in just the cache.
- Skip the default
before_script
because the job doesn't need it at all.
To simplify this greatly, this MR:
- Creates three hidden jobs:
-
.yarn
->yarn install
andcache
config, combined. -
.bundle
->bundle install
andcache
config, combined. -
.bundle_and_yarn
-> Both jobs above, combined into one.
-
- Any job that uses
yarn
,bundle
, or both now just needs to add one of the above jobs into theextends
section, and remove any extra cache jobs. - Any job that used
before_script: []
to avoid the defaultbefore_script
no longer needs it, because the default is deleted.
Edited by Marcel Amirault