Adds keyword to opt-out of cache isolation
What does this MR do and why?
Adds cache:unprotect
to allow users to opt-out of the cache isolation via the protected ref status.
Related to #362114 (closed)
How to set up and validate locally
In the default
section:
cache: &global_cache
key: $CI_COMMIT_REF_SLUG
paths:
- vendor/
policy: pull-push
unprotect: true
jobx:
script: ls
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
Using unprotect
per job cache:
unprotected_job:
script:
- echo
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- binaries/
unprotect: true
Default:
protected_job:
script:
- echo
cache:
key: "$CI_COMMIT_BRANCH"
paths:
- binaries/
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to: https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/1551
Edited by Marcel Amirault