diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-14 06:09:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-14 06:09:09 +0300 |
commit | 805f27a3271cab8f6000e8140df6a7bf9e7f2152 (patch) | |
tree | 6656244faf1622b1d3788671a6174a5e17b0f7ef /doc/ci/caching | |
parent | 3e81e2db0bf51f14987bbe87aaf085798c31c45f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci/caching')
-rw-r--r-- | doc/ci/caching/index.md | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/ci/caching/index.md b/doc/ci/caching/index.md index 219ca7a1e91..88d59b1f223 100644 --- a/doc/ci/caching/index.md +++ b/doc/ci/caching/index.md @@ -30,7 +30,7 @@ can't link to files outside it. - Subsequent pipelines can use the cache. - Subsequent jobs in the same pipeline can use the cache, if the dependencies are identical. - Different projects cannot share the cache. -- Protected and non-protected branches do not share the cache. +- By default, protected and non-protected branches [do not share the cache](#cache-key-names). However, you can [change this behavior](#use-the-same-cache-for-all-branches). ### Artifacts @@ -460,6 +460,24 @@ and `feature`, then the following table represents the resulting cache keys: | `main` | `main-protected` | | `feature` | `feature-non_protected` | +##### Use the same cache for all branches + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/361643) in GitLab 15.0. + +If you do not want to use [cache key names](#cache-key-names), +you can have all branches (protected and unprotected) use the same cache. + +The cache separation with [cache key names](#cache-key-names) is a security feature +and should only be disabled in an environment where all users with Developer role are highly trusted. + +To use the same cache for all branches: + +1. On the top bar, select **Menu > Projects** and find your project. +1. On the left sidebar, select **Settings > CI/CD**. +1. Expand **General pipelines**. +1. Clear the **Use separate caches for protected branches** checkbox. +1. Select **Save changes**. + ### How archiving and extracting works This example shows two jobs in two consecutive stages: |