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
2243f0e3
Commit
2243f0e3
authored
Oct 18, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add IncludeError exception and use it in CI config
parent
5f502c3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
lib/gitlab/ci/config.rb
lib/gitlab/ci/config.rb
+3
-3
lib/gitlab/ci/config/external/processor.rb
lib/gitlab/ci/config/external/processor.rb
+2
-1
spec/lib/gitlab/ci/config_spec.rb
spec/lib/gitlab/ci/config_spec.rb
+1
-1
No files found.
lib/gitlab/ci/config.rb
View file @
2243f0e3
...
...
@@ -13,10 +13,10 @@ module Gitlab
@global
=
Entry
::
Global
.
new
(
@config
)
@global
.
compose!
rescue
Loader
::
FormatError
,
Extendable
::
ExtensionError
=>
e
rescue
Loader
::
FormatError
,
Extendable
::
ExtensionError
,
External
::
Processor
::
IncludeError
=>
e
raise
Config
::
ConfigError
,
e
.
message
rescue
External
::
Processor
::
FileError
=>
e
raise
::
Gitlab
::
Ci
::
YamlProcessor
::
ValidationError
,
e
.
message
end
def
valid?
...
...
lib/gitlab/ci/config/external/processor.rb
View file @
2243f0e3
...
...
@@ -5,7 +5,8 @@ module Gitlab
class
Config
module
External
class
Processor
FileError
=
Class
.
new
(
StandardError
)
IncludeError
=
Class
.
new
(
StandardError
)
FileError
=
Class
.
new
(
IncludeError
)
def
initialize
(
values
,
project
,
sha
)
@values
=
values
...
...
spec/lib/gitlab/ci/config_spec.rb
View file @
2243f0e3
...
...
@@ -200,7 +200,7 @@ describe Gitlab::Ci::Config do
it
'raises error YamlProcessor validationError'
do
expect
{
config
}.
to
raise_error
(
::
Gitlab
::
Ci
::
YamlProcessor
::
Validation
Error
,
described_class
::
Config
Error
,
"Local file 'invalid' is not valid."
)
end
...
...
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