Class: Gitlab::Ci::Config::Entry::PullPolicy

Inherits:
Gitlab::Config::Entry::Node show all
Includes:
Gitlab::Config::Entry::Validatable
Defined in:
lib/gitlab/ci/config/entry/pull_policy.rb

Overview

Entry that represents a configuration of the pull policies of an image.

Constant Summary collapse

ALLOWED_POLICIES =
%w[always never if-not-present].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, #deprecation, #description, #key, #metadata, #parent

Instance Method Summary collapse

Methods included from Gitlab::Config::Entry::Validatable

#compose!, #errors, included, #validate, #validator

Methods inherited from Gitlab::Config::Entry::Node

#[], #add_warning, #ancestors, #array?, 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

#valueObject



26
27
28
29
# File 'lib/gitlab/ci/config/entry/pull_policy.rb', line 26

def value
  # We either return an array with policies or nothing
  Array(@config).presence
end