Class: Gitlab::Ci::Config::Entry::Artifacts
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Artifacts
- Includes:
- Gitlab::Config::Entry::Attributable, Gitlab::Config::Entry::Configurable, Gitlab::Config::Entry::Validatable
- Defined in:
- lib/gitlab/ci/config/entry/artifacts.rb
Overview
Entry that represents a configuration of job artifacts.
Constant Summary collapse
- ALLOWED_WHEN =
%w[on_success on_failure always].freeze
- ALLOWED_ACCESS =
%w[none developer all].freeze
- ALLOWED_KEYS =
%i[name untracked paths reports when expire_in expose_as exclude public access].freeze
- EXPOSE_AS_REGEX =
/\A\w[-\w ]*\z/
- EXPOSE_AS_ERROR_MESSAGE =
"can contain only letters, digits, '-', '_' and spaces"
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 included from Gitlab::Config::Entry::Configurable
#compose!, #entry_create!, #skip_config_hash_validation?
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
#expose_as_present? ⇒ Boolean
62 63 64 65 66 67 68 69 |
# File 'lib/gitlab/ci/config/entry/artifacts.rb', line 62 def expose_as_present? # This duplicates the `validates :config, type: Hash` above, # but Validatable currently doesn't halt the validation # chain if it encounters a validation error. return false unless @config.is_a?(Hash) !@config[:expose_as].nil? end |
#value ⇒ Object
57 58 59 60 |
# File 'lib/gitlab/ci/config/entry/artifacts.rb', line 57 def value @config[:reports] = reports_value if @config.key?(:reports) @config end |