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
99ee39bf
Commit
99ee39bf
authored
Jun 09, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments to new CI config classes and modules
parent
20ccd446
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
2 deletions
+35
-2
lib/gitlab/ci/config.rb
lib/gitlab/ci/config.rb
+3
-2
lib/gitlab/ci/config/node/configurable.rb
lib/gitlab/ci/config/node/configurable.rb
+11
-0
lib/gitlab/ci/config/node/entry.rb
lib/gitlab/ci/config/node/entry.rb
+3
-0
lib/gitlab/ci/config/node/global.rb
lib/gitlab/ci/config/node/global.rb
+4
-0
lib/gitlab/ci/config/node/null.rb
lib/gitlab/ci/config/node/null.rb
+6
-0
lib/gitlab/ci/config/node/script.rb
lib/gitlab/ci/config/node/script.rb
+8
-0
No files found.
lib/gitlab/ci/config.rb
View file @
99ee39bf
module
Gitlab
module
Gitlab
module
Ci
module
Ci
##
# Base GitLab CI Configuration facade
#
class
Config
class
Config
class
LoaderError
<
StandardError
;
end
delegate
:valid?
,
:errors
,
to: :@global
delegate
:valid?
,
:errors
,
to: :@global
##
##
...
...
lib/gitlab/ci/config/node/configurable.rb
View file @
99ee39bf
...
@@ -2,6 +2,17 @@ module Gitlab
...
@@ -2,6 +2,17 @@ module Gitlab
module
Ci
module
Ci
class
Config
class
Config
module
Node
module
Node
##
# This mixin is responsible for adding DSL, which purpose is to
# simplifly process of adding child nodes.
#
# This can be used only if parent node is a configuration entry that
# holds a hash as a configuration value, for example:
#
# job:
# script: ...
# artifacts: ...
#
module
Configurable
module
Configurable
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
...
...
lib/gitlab/ci/config/node/entry.rb
View file @
99ee39bf
...
@@ -2,6 +2,9 @@ module Gitlab
...
@@ -2,6 +2,9 @@ module Gitlab
module
Ci
module
Ci
class
Config
class
Config
module
Node
module
Node
##
# Base abstract class for each configuration entry node.
#
class
Entry
class
Entry
class
InvalidError
<
StandardError
;
end
class
InvalidError
<
StandardError
;
end
...
...
lib/gitlab/ci/config/node/global.rb
View file @
99ee39bf
...
@@ -2,6 +2,10 @@ module Gitlab
...
@@ -2,6 +2,10 @@ module Gitlab
module
Ci
module
Ci
class
Config
class
Config
module
Node
module
Node
##
# This class represents a global entry - root node for entire
# GitLab CI Configuration file.
#
class
Global
<
Entry
class
Global
<
Entry
include
Configurable
include
Configurable
...
...
lib/gitlab/ci/config/node/null.rb
View file @
99ee39bf
module
Gitlab
module
Gitlab
module
Ci
module
Ci
class
Config
class
Config
##
# This class represents a configuration entry that is not being used
# in configuration file.
#
# This implements Null Object pattern.
#
module
Node
module
Node
class
Null
<
Entry
class
Null
<
Entry
def
value
def
value
...
...
lib/gitlab/ci/config/node/script.rb
View file @
99ee39bf
...
@@ -2,6 +2,14 @@ module Gitlab
...
@@ -2,6 +2,14 @@ module Gitlab
module
Ci
module
Ci
class
Config
class
Config
module
Node
module
Node
##
# Entry that represents a script.
#
# Each element in the value array is a command that will be executed
# by GitLab Runner. Currently we concatenate this commands with
# new line character as a separator what is compatbile with
# implementation in Runner.
#
class
Script
<
Entry
class
Script
<
Entry
include
ValidationHelpers
include
ValidationHelpers
...
...
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