diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-01-06 13:51:06 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-01-06 13:51:06 +0000 |
commit | a7a7f8b15968418bf52d91341588f1c573f412c3 (patch) | |
tree | 787f81c62ca03677798cd1fa9adf037b326f5c91 /app/models | |
parent | 6d972724d426938a0bfd6744dc6464ec5f7e17f9 (diff) | |
parent | ff5124ed6ecb2f20841e535b3aaa3b0d230f920f (diff) | |
download | gitlab-ce-a7a7f8b15968418bf52d91341588f1c573f412c3.tar.gz |
Merge branch '41249-clearing-the-cache' into 'master'
Resolve "Clearing the cache"
Closes #41249
See merge request gitlab-org/gitlab-ce!16067
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/build.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 83fe23606d1..d0ee08ab086 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -461,7 +461,14 @@ module Ci end def cache - [options[:cache]] + cache = options[:cache] + + if cache && project.jobs_cache_index + cache = cache.merge( + key: "#{cache[:key]}:#{project.jobs_cache_index}") + end + + [cache] end def credentials |