Merge branch 'patch-2' into 'master'

Replace "/" with "-" in cache key documentation

See merge request gitlab-org/gitlab-ce!14034
This commit is contained in:
Grzegorz Bizon 2017-09-19 15:47:46 +00:00
commit c12035f9dc
1 changed files with 6 additions and 4 deletions

View File

@ -252,6 +252,8 @@ The `cache:key` variable can use any of the [predefined variables](../variables/
The default key is **default** across the project, therefore everything is
shared between each pipelines and jobs by default, starting from GitLab 9.0.
>**Note:** The `cache:key` variable cannot contain the `/` character.
---
**Example configurations**
@ -276,7 +278,7 @@ To enable per-job and per-branch caching:
```yaml
cache:
key: "$CI_JOB_NAME/$CI_COMMIT_REF_NAME"
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
untracked: true
```
@ -284,7 +286,7 @@ To enable per-branch and per-stage caching:
```yaml
cache:
key: "$CI_JOB_STAGE/$CI_COMMIT_REF_NAME"
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
untracked: true
```
@ -293,7 +295,7 @@ If you use **Windows Batch** to run your shell scripts you need to replace
```yaml
cache:
key: "%CI_JOB_STAGE%/%CI_COMMIT_REF_NAME%"
key: "%CI_JOB_STAGE%-%CI_COMMIT_REF_NAME%"
untracked: true
```
@ -302,7 +304,7 @@ If you use **Windows PowerShell** to run your shell scripts you need to replace
```yaml
cache:
key: "$env:CI_JOB_STAGE/$env:CI_COMMIT_REF_NAME"
key: "$env:CI_JOB_STAGE-$env:CI_COMMIT_REF_NAME"
untracked: true
```