Decouple node-modules caching from any specific branch
What does this MR do and why?
- Follow up to Decouple ruby gem caching from specific branche... (!199227 - merged) but for node_modules. Ensures cache is updated and automatically populated once files that can affect it change.
- Additionally use the opportunity to reduce some duplication in image definitions and move it to separate file for reusability
- Adds conditional variable to skip patching instead of running command with reverse flag
References
- Closes node-modules caching (gitlab-com/gl-infra/delivery#21393 - closed)
- Part of Improve dependency caching in CI pipelines (gitlab-com/gl-infra/delivery#21130 - closed)
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