From a8c40687748cb5952e4c1bddc8b2c68a43567b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zaj=C4=85czkowski?= Date: Mon, 4 Sep 2017 17:04:51 +0000 Subject: Replace "/" with "-" in cache key As a cache zip file with "/" upload seems to fail with 500 Internal Server Error. --- doc/ci/yaml/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/ci/yaml') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index cacfd2ed254..4e925346ff5 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -276,7 +276,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 +284,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 +293,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 +302,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 ``` -- cgit v1.2.1 From 0f84309200ca5f9b446af782b4ad021b10f135c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zaj=C4=85czkowski?= Date: Mon, 18 Sep 2017 11:59:16 +0000 Subject: Note about "/" which cannot be used in "cache:key" --- doc/ci/yaml/README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/ci/yaml') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 4e925346ff5..034ac6b4730 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -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** -- cgit v1.2.1