Skip to content
Snippets Groups Projects
Commit f05ad3c5b33d authored by Balasankar 'Balu' C's avatar Balasankar 'Balu' C
Browse files

Use per-branch cache with master branch as fallback


- Each branch merge request caches its own results and
  if that cache is not present, uses cache from the
  default pipeline.

Signed-off-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
parent 3b3ef09e1d86
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
- node_modules - node_modules
.branch-cache: .branch-cache:
key: "${CI_JOB_NAME}-${BUILDER_IMAGE_REVISION}-${CACHE_EDITION}${CACHE_KEY_SUFFIX}" key: "${CI_JOB_NAME}-${BUILDER_IMAGE_REVISION}-${CACHE_EDITION}${CACHE_KEY_SUFFIX}-${CI_COMMIT_REF_SLUG}"
fallback_keys:
- "${CI_JOB_NAME}-${BUILDER_IMAGE_REVISION}-${CACHE_EDITION}${CACHE_KEY_SUFFIX}-${CI_DEFAULT_BRANCH}"
paths: !reference [.cache-paths] paths: !reference [.cache-paths]
policy: $CACHE_POLICY policy: $CACHE_POLICY
......
...@@ -86,8 +86,6 @@ ...@@ -86,8 +86,6 @@
junit: junit_rspec.xml junit: junit_rspec.xml
.base-trigger-job-variables: .base-trigger-job-variables:
# In trigger jobs, we don't want to pollute cache
CACHE_POLICY: 'pull'
ALTERNATIVE_SOURCES: 'true' ALTERNATIVE_SOURCES: 'true'
SECURITY_SOURCES: ${SECURITY_SOURCES} SECURITY_SOURCES: ${SECURITY_SOURCES}
BUILDER_IMAGE_REVISION: ${BUILDER_IMAGE_REVISION} BUILDER_IMAGE_REVISION: ${BUILDER_IMAGE_REVISION}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment