Class: Gitlab::Ci::Config::Entry::Image
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Image
- Includes:
- Gitlab::Config::Entry::Attributable, Gitlab::Config::Entry::Configurable, Gitlab::Config::Entry::Validatable
- Defined in:
- lib/gitlab/ci/config/entry/image.rb
Overview
Entry that represents a Docker image.
Constant Summary collapse
- ALLOWED_KEYS =
%i[name entrypoint 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
- #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
#entrypoint ⇒ Object
35 36 37 |
# File 'lib/gitlab/ci/config/entry/image.rb', line 35 def entrypoint value[:entrypoint] end |
#name ⇒ Object
31 32 33 |
# File 'lib/gitlab/ci/config/entry/image.rb', line 31 def name value[:name] end |
#skip_config_hash_validation? ⇒ Boolean
50 51 52 |
# File 'lib/gitlab/ci/config/entry/image.rb', line 50 def skip_config_hash_validation? true end |
#value ⇒ Object
39 40 41 42 43 44 |
# File 'lib/gitlab/ci/config/entry/image.rb', line 39 def value return { name: @config } if string? return @config if hash? {} end |
#with_image_ports? ⇒ Boolean
46 47 48 |
# File 'lib/gitlab/ci/config/entry/image.rb', line 46 def with_image_ports? opt(:with_image_ports) end |