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
6609589b
Commit
6609589b
authored
Jun 06, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ci config global and before_script entries
parent
23030439
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
1 deletion
+59
-1
lib/gitlab/ci/config/entry/base_entry.rb
lib/gitlab/ci/config/entry/base_entry.rb
+15
-0
lib/gitlab/ci/config/entry/before_script.rb
lib/gitlab/ci/config/entry/before_script.rb
+13
-0
lib/gitlab/ci/config/entry/global.rb
lib/gitlab/ci/config/entry/global.rb
+13
-0
spec/lib/gitlab/ci/config/entry/before_script_spec.rb
spec/lib/gitlab/ci/config/entry/before_script_spec.rb
+11
-0
spec/lib/gitlab/ci/config/entry/global_spec.rb
spec/lib/gitlab/ci/config/entry/global_spec.rb
+5
-0
spec/lib/gitlab/ci/config_spec.rb
spec/lib/gitlab/ci/config_spec.rb
+2
-1
No files found.
lib/gitlab/ci/config/entry/base_entry.rb
0 → 100644
View file @
6609589b
module
Gitlab
module
Ci
class
Config
module
Entry
class
BaseEntry
def
initialize
(
hash
,
config
,
parent
=
nil
)
@hash
=
hash
@config
=
config
@parent
=
parent
end
end
end
end
end
end
lib/gitlab/ci/config/entry/before_script.rb
0 → 100644
View file @
6609589b
module
Gitlab
module
Ci
class
Config
module
Entry
class
BeforeScript
<
BaseEntry
def
leaf?
true
end
end
end
end
end
end
lib/gitlab/ci/config/entry/global.rb
0 → 100644
View file @
6609589b
module
Gitlab
module
Ci
class
Config
module
Entry
class
Global
<
BaseEntry
def
allowed_keys
[]
end
end
end
end
end
end
spec/lib/gitlab/ci/config/entry/before_script_spec.rb
0 → 100644
View file @
6609589b
require
'spec_helper'
describe
Gitlab
::
Ci
::
Config
::
Entry
::
BeforeScript
do
let
(
:entry
)
{
described_class
.
new
(
hash
,
config
)
}
describe
'#leaf?'
do
it
'is a leaf entry'
do
expect
(
entry
).
to
be_leaf
end
end
end
spec/lib/gitlab/ci/config/entry/global_spec.rb
0 → 100644
View file @
6609589b
require
'spec_helper'
describe
Gitlab
::
Ci
::
Config
::
Entry
::
Global
do
end
spec/lib/gitlab/ci/config_spec.rb
View file @
6609589b
...
...
@@ -37,7 +37,8 @@ describe Gitlab::Ci::Config do
describe
'.new'
do
it
'raises error'
do
expect
{
config
}.
to
raise_error
(
Gitlab
::
Ci
::
Config
::
LoaderError
,
/Invalid configuration format/
Gitlab
::
Ci
::
Config
::
LoaderError
,
/Invalid configuration format/
)
end
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