summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2018-01-29 17:12:43 +0000
committerIan Baum <ibaum@gitlab.com>2018-01-29 11:55:03 -0600
commitf4ee20010b8a99db821e3eace0ccb9a4ef231ae2 (patch)
tree3fd481d5b6ea2b04ef5432e0348f231bf3202fd9
parentbe80a97c8ba0d0eb6fb6f88454a97a2bc59662da (diff)
downloadgitlab-ce-f4ee20010b8a99db821e3eace0ccb9a4ef231ae2.tar.gz
Merge branch 'fix-cache-clear-windows' into 'master'
Fix cache clear windows Closes #42487 See merge request gitlab-org/gitlab-ce!16740
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--changelogs/unreleased/fix-cache-clear-windows.yml5
-rw-r--r--spec/models/ci/build_spec.rb2
3 files changed, 7 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 6012dbba1b9..3de8f33f743 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -465,7 +465,7 @@ module Ci
if cache && project.jobs_cache_index
cache = cache.merge(
- key: "#{cache[:key]}:#{project.jobs_cache_index}")
+ key: "#{cache[:key]}_#{project.jobs_cache_index}")
end
[cache]
diff --git a/changelogs/unreleased/fix-cache-clear-windows.yml b/changelogs/unreleased/fix-cache-clear-windows.yml
new file mode 100644
index 00000000000..2be6bac004b
--- /dev/null
+++ b/changelogs/unreleased/fix-cache-clear-windows.yml
@@ -0,0 +1,5 @@
+---
+title: 'Fix cache clear bug withg using : on Windows'
+merge_request: 16740
+author:
+type: fixed
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 3eaeeebf97d..14b68d49913 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -270,7 +270,7 @@ describe Ci::Build do
allow_any_instance_of(Project).to receive(:jobs_cache_index).and_return(1)
end
- it { is_expected.to be_an(Array).and all(include(key: "key:1")) }
+ it { is_expected.to be_an(Array).and all(include(key: "key_1")) }
end
context 'when project does not have jobs_cache_index' do