GitLab CI/CD 1 · Caching, artifacts and ordering

Cache dependencies

Reuse downloaded packages between pipelines. The key changes when the lock file does.

test-job:
  cache:
    key:
      files:
        - package-lock.json
    paths:
      - node_modules/

Official GitLab CI/CD 1 documentation

More caching, artifacts and ordering commands

All caching, artifacts and ordering commands · GitLab CI/CD 1 cheatsheet

Was this page helpful?