Commit 8c9c3eda authored by Grzegorz Bizon's avatar Grzegorz Bizon

Prevalidate CI entries recursively on processed

parent 80587064
......@@ -31,10 +31,9 @@ module Gitlab
end
def validate!
if @validator.valid?(:new)
@validator.validate(:processed)
end
return unless valid?
@validator.validate(:processed)
@entries.each_value(&:validate!)
end
......
......@@ -1065,7 +1065,7 @@ EOT
end
it "returns errors if there are no visible jobs defined" do
config = YAML.dump({ before_script: ["bundle update"], '.hidden'.to_sym => {} })
config = YAML.dump({ before_script: ["bundle update"], '.hidden'.to_sym => { script: 'ls' } })
expect do
GitlabCiYamlProcessor.new(config, path)
end.to raise_error(GitlabCiYamlProcessor::ValidationError, "jobs config should contain at least one visible job")
......
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