Skip to content

Decouple ruby gem caching from specific branches and scheduled pipelines

What does this MR do and why?

Update ruby gem caching setup so it is completely decoupled from any specific pipeline types or branches for cache population. This fixes cache not working in stable branches or in any other forks that do not run bi-hourly scheduled pipeline only present in gitlab-org/gitlab project.

Implementation

  • Run cache pull/push job in all pipelines with cache key being based on Gemfile.lock so it's uniqueness is coupled to the gem state
  • Update all jobs that had needs: [] to optionally depend on newly added cache job
  • Add extra _gem-cache.rails-next.yml file to override cache key only for rails next pipelines
  • Removes separate coverage cache, instead, main cache contains all gems defined in gemfile

References

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by andrey

Merge request reports

Loading