Class: Gitlab::Ci::Config::Entry::Services
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Services
- Includes:
- Gitlab::Config::Entry::Validatable
- Defined in:
- lib/gitlab/ci/config/entry/services.rb
Overview
Entry that represents a configuration of Docker services.
Constant Summary
Constants inherited from Gitlab::Config::Entry::Node
Gitlab::Config::Entry::Node::InvalidError
Instance Attribute Summary
Attributes inherited from Gitlab::Config::Entry::Node
#config, #default, #description, #key, #metadata, #parent
Instance Method Summary collapse
Methods included from Gitlab::Config::Entry::Validatable
#errors, included, #validate, #validator
Methods inherited from Gitlab::Config::Entry::Node
#[], #add_warning, #ancestors, aspects, default, #errors, #hash?, #initialize, #inspect, #integer?, #leaf?, #location, #opt, #relevant?, #specified?, #string?, #valid?, #warnings, with_aspect
Constructor Details
This class inherits a constructor from Gitlab::Config::Entry::Node
Instance Method Details
#compose!(deps = nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gitlab/ci/config/entry/services.rb', line 18 def compose!(deps = nil) super do @entries = [] @config.each do |config| @entries << ::Gitlab::Config::Entry::Factory.new(Entry::Service) .value(config || {}) .with(key: "service", parent: self, description: "service definition.") # rubocop:disable CodeReuse/ActiveRecord .create! end @entries.each do |entry| entry.compose!(deps) end end end |
#descendants ⇒ Object
38 39 40 |
# File 'lib/gitlab/ci/config/entry/services.rb', line 38 def descendants @entries end |
#value ⇒ Object
34 35 36 |
# File 'lib/gitlab/ci/config/entry/services.rb', line 34 def value @entries.map(&:value) end |