Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
8c9c3eda
Commit
8c9c3eda
authored
Jul 12, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevalidate CI entries recursively on processed
parent
80587064
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
lib/gitlab/ci/config/node/entry.rb
lib/gitlab/ci/config/node/entry.rb
+2
-3
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+1
-1
No files found.
lib/gitlab/ci/config/node/entry.rb
View file @
8c9c3eda
...
@@ -31,10 +31,9 @@ module Gitlab
...
@@ -31,10 +31,9 @@ module Gitlab
end
end
def
validate!
def
validate!
if
@validator
.
valid?
(
:new
)
return
unless
valid?
@validator
.
validate
(
:processed
)
end
@validator
.
validate
(
:processed
)
@entries
.
each_value
(
&
:validate!
)
@entries
.
each_value
(
&
:validate!
)
end
end
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
8c9c3eda
...
@@ -1065,7 +1065,7 @@ EOT
...
@@ -1065,7 +1065,7 @@ EOT
end
end
it
"returns errors if there are no visible jobs defined"
do
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
expect
do
GitlabCiYamlProcessor
.
new
(
config
,
path
)
GitlabCiYamlProcessor
.
new
(
config
,
path
)
end
.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
"jobs config should contain at least one visible job"
)
end
.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
"jobs config should contain at least one visible job"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment