Refactor Ci::Build#cache
This commit is contained in:
parent
8cc14dd537
commit
2682966829
1 changed files with 7 additions and 4 deletions
|
@ -461,11 +461,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
|
||||||
|
|
Loading…
Reference in a new issue