Class: Gitlab::Ci::Config::Entry::Service
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Service
- Includes:
- Gitlab::Config::Entry::Attributable, Gitlab::Config::Entry::Configurable, Gitlab::Config::Entry::Validatable
- Defined in:
- lib/gitlab/ci/config/entry/service.rb
Overview
Entry that represents a configuration of Docker service.
TODO: remove duplication with Image superclass by defining a common Imageable concern. gitlab.com/gitlab-org/gitlab/issues/208774
Constant Summary collapse
- ALLOWED_KEYS =
%i[name entrypoint command alias ports].freeze
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
- #alias ⇒ Object
- #command ⇒ Object
- #entrypoint ⇒ Object
- #name ⇒ Object
- #skip_config_hash_validation? ⇒ Boolean
- #value ⇒ Object
- #with_image_ports? ⇒ Boolean
Methods included from Gitlab::Config::Entry::Configurable
Methods included from Gitlab::Config::Entry::Validatable
#compose!, #errors, included, #validate, #validator
Methods inherited from Gitlab::Config::Entry::Node
#[], #add_warning, #ancestors, aspects, #compose!, default, #descendants, #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
#alias ⇒ Object
37 38 39 |
# File 'lib/gitlab/ci/config/entry/service.rb', line 37 def alias value[:alias] end |
#command ⇒ Object
41 42 43 |
# File 'lib/gitlab/ci/config/entry/service.rb', line 41 def command value[:command] end |
#entrypoint ⇒ Object
49 50 51 |
# File 'lib/gitlab/ci/config/entry/service.rb', line 49 def entrypoint value[:entrypoint] end |
#name ⇒ Object
45 46 47 |
# File 'lib/gitlab/ci/config/entry/service.rb', line 45 def name value[:name] end |
#skip_config_hash_validation? ⇒ Boolean
64 65 66 |
# File 'lib/gitlab/ci/config/entry/service.rb', line 64 def skip_config_hash_validation? true end |
#value ⇒ Object
53 54 55 56 57 58 |
# File 'lib/gitlab/ci/config/entry/service.rb', line 53 def value return { name: @config } if string? return @config if hash? {} end |
#with_image_ports? ⇒ Boolean
60 61 62 |
# File 'lib/gitlab/ci/config/entry/service.rb', line 60 def with_image_ports? opt(:with_image_ports) end |