Class: Gitlab::Ci::Config::Entry::Root
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Root
- Extended by:
- Utils::StrongMemoize
- Includes:
- Gitlab::Config::Entry::Configurable
- Defined in:
- lib/gitlab/ci/config/entry/root.rb
Overview
This class represents a global entry - root Entry for entire GitLab CI Configuration file.
Constant Summary collapse
- ALLOWED_KEYS =
%i[default include before_script image services after_script variables stages cache workflow].freeze
Constants inherited from Gitlab::Config::Entry::Node
Gitlab::Config::Entry::Node::InvalidError
Instance Attribute Summary collapse
-
#jobs_config ⇒ Object
readonly
Returns the value of attribute jobs_config.
Attributes inherited from Gitlab::Config::Entry::Node
#config, #default, #deprecation, #description, #key, #metadata, #parent
Class Method Summary collapse
Instance Method Summary collapse
- #compose!(_deps = nil) ⇒ Object
-
#initialize(config, **metadata) ⇒ Root
constructor
A new instance of Root.
Methods included from Gitlab::Config::Entry::Configurable
#entry_create!, #skip_config_hash_validation?
Methods inherited from Gitlab::Config::Entry::Node
#[], #add_warning, #ancestors, #array?, aspects, default, #descendants, #errors, #hash?, #inspect, #integer?, #leaf?, #location, #opt, #relevant?, #specified?, #string?, #valid?, #value, #warnings, with_aspect
Constructor Details
#initialize(config, **metadata) ⇒ Root
Returns a new instance of Root.
90 91 92 93 94 |
# File 'lib/gitlab/ci/config/entry/root.rb', line 90 def initialize(config, **) super do filter_jobs! end end |
Instance Attribute Details
#jobs_config ⇒ Object (readonly)
Returns the value of attribute jobs_config.
76 77 78 |
# File 'lib/gitlab/ci/config/entry/root.rb', line 76 def jobs_config @jobs_config end |
Class Method Details
.reserved_nodes_names ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/gitlab/ci/config/entry/root.rb', line 81 def reserved_nodes_names strong_memoize(:reserved_nodes_names) do self.nodes.select do |_, node| node.reserved? end.keys end end |
Instance Method Details
#compose!(_deps = nil) ⇒ Object
96 97 98 99 100 |
# File 'lib/gitlab/ci/config/entry/root.rb', line 96 def compose!(_deps = nil) super(self) do compose_jobs! end end |