Commit 0fe0b044 authored by Lin Jen-Shin's avatar Lin Jen-Shin

No need to set cache:key if no path was specified

Feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9666/diffs#note_24607518
parent cce1792c
......@@ -25,10 +25,6 @@ module Gitlab
helpers :key
def self.default
{ key: Entry::Key.default }
end
def value
super.merge(key: key_value)
end
......
......@@ -51,7 +51,7 @@ module Ci
commands: "pwd\nrspec",
coverage_regex: nil,
tag_list: [],
options: { cache: { key: 'default' } },
options: {},
allow_failure: false,
when: "on_success",
environment: nil,
......@@ -468,8 +468,7 @@ module Ci
tag_list: [],
options: {
image: "ruby:2.1",
services: ["mysql"],
cache: { key: 'default' }
services: ["mysql"]
},
allow_failure: false,
when: "on_success",
......@@ -498,8 +497,7 @@ module Ci
tag_list: [],
options: {
image: "ruby:2.5",
services: ["postgresql"],
cache: { key: 'default' }
services: ["postgresql"]
},
allow_failure: false,
when: "on_success",
......@@ -740,7 +738,6 @@ module Ci
options: {
image: "ruby:2.1",
services: ["mysql"],
cache: { key: 'default' },
artifacts: {
name: "custom_name",
paths: ["logs/", "binaries/"],
......@@ -950,7 +947,7 @@ module Ci
commands: "test",
coverage_regex: nil,
tag_list: [],
options: { cache: { key: 'default' } },
options: {},
when: "on_success",
allow_failure: false,
environment: nil,
......@@ -996,7 +993,7 @@ module Ci
commands: "execute-script-for-job",
coverage_regex: nil,
tag_list: [],
options: { cache: { key: 'default' } },
options: {},
when: "on_success",
allow_failure: false,
environment: nil,
......@@ -1009,7 +1006,7 @@ module Ci
commands: "execute-script-for-job",
coverage_regex: nil,
tag_list: [],
options: { cache: { key: 'default' } },
options: {},
when: "on_success",
allow_failure: false,
environment: nil,
......
......@@ -144,8 +144,7 @@ describe Gitlab::Ci::Config::Entry::Job do
script: %w[rspec],
commands: "ls\npwd\nrspec",
stage: 'test',
after_script: %w[cleanup],
cache: { key: 'default' })
after_script: %w[cleanup])
end
end
end
......
......@@ -62,13 +62,11 @@ describe Gitlab::Ci::Config::Entry::Jobs do
rspec: { name: :rspec,
script: %w[rspec],
commands: 'rspec',
stage: 'test',
cache: { key: 'default' } },
stage: 'test' },
spinach: { name: :spinach,
script: %w[spinach],
commands: 'spinach',
stage: 'test',
cache: { key: 'default' } })
stage: 'test' })
end
end
......
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