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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f52c61f8
Commit
f52c61f8
authored
Sep 18, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not initialize YAML processor with project full path
parent
d79ad28f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
64 deletions
+62
-64
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
lib/gitlab/ci/yaml_processor.rb
lib/gitlab/ci/yaml_processor.rb
+2
-3
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+59
-60
No files found.
app/models/ci/pipeline.rb
View file @
f52c61f8
...
@@ -337,7 +337,7 @@ module Ci
...
@@ -337,7 +337,7 @@ module Ci
return
@config_processor
if
defined?
(
@config_processor
)
return
@config_processor
if
defined?
(
@config_processor
)
@config_processor
||=
begin
@config_processor
||=
begin
Gitlab
::
Ci
::
YamlProcessor
.
new
(
ci_yaml_file
,
project
.
full_path
)
Gitlab
::
Ci
::
YamlProcessor
.
new
(
ci_yaml_file
)
rescue
Gitlab
::
Ci
::
YamlProcessor
::
ValidationError
,
Psych
::
SyntaxError
=>
e
rescue
Gitlab
::
Ci
::
YamlProcessor
::
ValidationError
,
Psych
::
SyntaxError
=>
e
self
.
yaml_errors
=
e
.
message
self
.
yaml_errors
=
e
.
message
nil
nil
...
...
lib/gitlab/ci/yaml_processor.rb
View file @
f52c61f8
...
@@ -5,12 +5,11 @@ module Gitlab
...
@@ -5,12 +5,11 @@ module Gitlab
include
Gitlab
::
Ci
::
Config
::
Entry
::
LegacyValidationHelpers
include
Gitlab
::
Ci
::
Config
::
Entry
::
LegacyValidationHelpers
attr_reader
:
path
,
:
cache
,
:stages
,
:jobs
attr_reader
:cache
,
:stages
,
:jobs
def
initialize
(
config
,
path
=
nil
)
def
initialize
(
config
)
@ci_config
=
Gitlab
::
Ci
::
Config
.
new
(
config
)
@ci_config
=
Gitlab
::
Ci
::
Config
.
new
(
config
)
@config
=
@ci_config
.
to_hash
@config
=
@ci_config
.
to_hash
@path
=
path
unless
@ci_config
.
valid?
unless
@ci_config
.
valid?
raise
ValidationError
,
@ci_config
.
errors
.
first
raise
ValidationError
,
@ci_config
.
errors
.
first
...
...
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
f52c61f8
This diff is collapsed.
Click to expand it.
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