Commit 0d7a785a authored by Matija Čupić's avatar Matija Čupić

Refactor Ci::Build#cache

parent ac0bf637
...@@ -471,11 +471,14 @@ module Ci ...@@ -471,11 +471,14 @@ module Ci
end end
def cache def cache
if options[:cache] && project.jobs_cache_index cache = options[:cache]
options[:cache].merge(key: "#{options[:cache][:key]}:#{project.jobs_cache_index}")
else if cache && project.jobs_cache_index
[options[:cache]] cache = cache.merge(
key: "#{cache[:key]}:#{project.jobs_cache_index}")
end end
[cache]
end end
def credentials def credentials
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment