Skip to content

Simplify yarn and bundle dependency and cache CI config

Marcel Amirault requested to merge docs-ssot-yarn-commands-pipeline into main

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-defined before_script, and then bring in the cache config through an extends addition.
  • Run yarn install and bring in the yarn cache through two separate extends.
  • 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 and cache config, combined.
    • .bundle -> bundle install and cache 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 the extends section, and remove any extra cache jobs.
  • Any job that used before_script: [] to avoid the default before_script no longer needs it, because the default is deleted.
Edited by Marcel Amirault

Merge request reports