diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-01-29 17:12:43 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-01-29 17:12:43 +0000 |
commit | 44edd1111f9ba6dd0dacffad23b54c0c85a723c4 (patch) | |
tree | 706db4c362e25f50ba09d970fd020099e5dc5fa3 | |
parent | 5462e2bb17510e6040ff3f0e69876b793ea6d35f (diff) | |
parent | 44c2f802be0a13612b1d8951207f4badc3305e86 (diff) | |
download | gitlab-ce-44edd1111f9ba6dd0dacffad23b54c0c85a723c4.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.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/fix-cache-clear-windows.yml | 5 | ||||
-rw-r--r-- | spec/models/ci/build_spec.rb | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index df67fb243ad..6ced5fb0e24 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -466,7 +466,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 45a606c1ea8..f5b3b4a9fc5 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -277,7 +277,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 |