2016-06-06 03:24:16 -04:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
class Config
|
|
|
|
module Node
|
2016-06-09 07:01:19 -04:00
|
|
|
##
|
|
|
|
# This class represents a global entry - root node for entire
|
|
|
|
# GitLab CI Configuration file.
|
|
|
|
#
|
2016-06-06 03:24:16 -04:00
|
|
|
class Global < Entry
|
2016-06-09 04:08:49 -04:00
|
|
|
include Configurable
|
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :before_script, Node::Script,
|
2016-06-09 04:53:56 -04:00
|
|
|
description: 'Script that will be executed before each job.'
|
2016-06-21 06:10:13 -04:00
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :image, Node::Image,
|
2016-06-21 06:10:13 -04:00
|
|
|
description: 'Docker image that will be used to execute jobs.'
|
2016-06-21 06:40:52 -04:00
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :services, Node::Services,
|
2016-06-21 06:40:52 -04:00
|
|
|
description: 'Docker images that will be linked to the container.'
|
2016-06-21 07:02:14 -04:00
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :after_script, Node::Script,
|
2016-06-21 07:02:14 -04:00
|
|
|
description: 'Script that will be executed after each job.'
|
2016-06-22 05:22:53 -04:00
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :variables, Node::Variables,
|
2016-06-22 05:22:53 -04:00
|
|
|
description: 'Environment variables that will be used.'
|
2016-06-23 07:51:07 -04:00
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :stages, Node::Stages,
|
2016-06-23 07:51:07 -04:00
|
|
|
description: 'Configuration of stages for this pipeline.'
|
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :types, Node::Stages,
|
2016-06-23 07:51:07 -04:00
|
|
|
description: 'Stages for this pipeline (deprecated key).'
|
|
|
|
|
2016-06-29 06:20:45 -04:00
|
|
|
node :cache, Node::Cache,
|
2016-06-29 03:39:04 -04:00
|
|
|
description: 'Configure caching between build jobs.'
|
|
|
|
|
|
|
|
helpers :before_script, :image, :services, :after_script,
|
|
|
|
:variables, :stages, :types, :cache
|
2016-06-24 04:13:55 -04:00
|
|
|
|
2016-06-23 07:51:07 -04:00
|
|
|
def stages
|
|
|
|
stages_defined? ? stages_value : types_value
|
|
|
|
end
|
2016-06-06 03:24:16 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|