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
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
...
@@ -20,12 +20,8 @@ module Gitlab
end
end
def
process!
def
process!
return
if
leaf?
compose!
unless
leaf?
return
unless
valid?
@validator
.
validate
(
:processed
)
if
valid?
compose!
process_nodes!
@validator
.
validate
(
:processed
)
end
end
def
leaf?
def
leaf?
...
@@ -90,12 +86,12 @@ module Gitlab
...
@@ -90,12 +86,12 @@ module Gitlab
private
private
def
compose!
def
compose!
return
unless
valid?
nodes
.
each
do
|
key
,
essence
|
nodes
.
each
do
|
key
,
essence
|
@nodes
[
key
]
=
create_node
(
key
,
essence
)
@nodes
[
key
]
=
create_node
(
key
,
essence
)
end
end
end
def
process_nodes!
@nodes
.
each_value
(
&
:process!
)
@nodes
.
each_value
(
&
:process!
)
end
end
...
...
lib/gitlab/ci/config/node/jobs.rb
View file @
de8b93bb
...
@@ -27,10 +27,6 @@ module Gitlab
...
@@ -27,10 +27,6 @@ module Gitlab
@nodes
.
values
.
any?
(
&
:relevant?
)
@nodes
.
values
.
any?
(
&
:relevant?
)
end
end
def
leaf?
false
end
private
private
def
create_node
(
key
,
value
)
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