提交 c12035f9 编写于 作者: G Grzegorz Bizon

Merge branch 'patch-2' into 'master'

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

See merge request gitlab-org/gitlab-ce!14034
......@@ -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
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册