Add comments to new CI config classes and modules
This commit is contained in:
parent
20ccd4465b
commit
99ee39bf6c
|
@ -1,8 +1,9 @@
|
|||
module Gitlab
|
||||
module Ci
|
||||
##
|
||||
# Base GitLab CI Configuration facade
|
||||
#
|
||||
class Config
|
||||
class LoaderError < StandardError; end
|
||||
|
||||
delegate :valid?, :errors, to: :@global
|
||||
|
||||
##
|
||||
|
|
|
@ -2,6 +2,17 @@ module Gitlab
|
|||
module Ci
|
||||
class Config
|
||||
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
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@ module Gitlab
|
|||
module Ci
|
||||
class Config
|
||||
module Node
|
||||
##
|
||||
# Base abstract class for each configuration entry node.
|
||||
#
|
||||
class Entry
|
||||
class InvalidError < StandardError; end
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@ module Gitlab
|
|||
module Ci
|
||||
class Config
|
||||
module Node
|
||||
##
|
||||
# This class represents a global entry - root node for entire
|
||||
# GitLab CI Configuration file.
|
||||
#
|
||||
class Global < Entry
|
||||
include Configurable
|
||||
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
module Gitlab
|
||||
module Ci
|
||||
class Config
|
||||
##
|
||||
# This class represents a configuration entry that is not being used
|
||||
# in configuration file.
|
||||
#
|
||||
# This implements Null Object pattern.
|
||||
#
|
||||
module Node
|
||||
class Null < Entry
|
||||
def value
|
||||
|
|
|
@ -2,6 +2,14 @@ module Gitlab
|
|||
module Ci
|
||||
class Config
|
||||
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
|
||||
include ValidationHelpers
|
||||
|
||||
|
|
Loading…
Reference in New Issue