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
Boxiang Sun
gitlab-ce
Commits
de8b93bb
Commit
de8b93bb
authored
Jul 07, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve validation of CI config entry if composite
parent
fea77624
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
lib/gitlab/ci/config/node/entry.rb
lib/gitlab/ci/config/node/entry.rb
+4
-8
lib/gitlab/ci/config/node/jobs.rb
lib/gitlab/ci/config/node/jobs.rb
+0
-4
No files found.
lib/gitlab/ci/config/node/entry.rb
View file @
de8b93bb
...
...
@@ -20,12 +20,8 @@ module Gitlab
end
def
process!
return
if
leaf?
return
unless
valid?
compose!
process_nodes!
@validator
.
validate
(
:processed
)
compose!
unless
leaf?
@validator
.
validate
(
:processed
)
if
valid?
end
def
leaf?
...
...
@@ -90,12 +86,12 @@ module Gitlab
private
def
compose!
return
unless
valid?
nodes
.
each
do
|
key
,
essence
|
@nodes
[
key
]
=
create_node
(
key
,
essence
)
end
end
def
process_nodes!
@nodes
.
each_value
(
&
:process!
)
end
...
...
lib/gitlab/ci/config/node/jobs.rb
View file @
de8b93bb
...
...
@@ -27,10 +27,6 @@ module Gitlab
@nodes
.
values
.
any?
(
&
:relevant?
)
end
def
leaf?
false
end
private
def
create_node
(
key
,
value
)
...
...
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