Class: Gitlab::Ci::Config::Entry::Retry::FullRetry
- Inherits:
-
Gitlab::Config::Entry::Node
- Object
- Gitlab::Config::Entry::Node
- Gitlab::Ci::Config::Entry::Retry::FullRetry
- Defined in:
- lib/gitlab/ci/config/entry/retry.rb
Constant Summary collapse
- ALLOWED_KEYS =
%i[max when exit_codes].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
Class Method Summary collapse
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?, #opt, #relevant?, #specified?, #string?, #valid?, #warnings, with_aspect
Constructor Details
This class inherits a constructor from Gitlab::Config::Entry::Node
Class Method Details
Instance Method Details
#location ⇒ Object
78 79 80 |
# File 'lib/gitlab/ci/config/entry/retry.rb', line 78 def location 'retry' end |
#value ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/gitlab/ci/config/entry/retry.rb', line 64 def value super.tap do |config| # make sure that `when` and `exit_codes` are arrays, because we allow them to # be passed as a String/Integer in config for simplicity config[:when] = Array.wrap(config[:when]) if config[:when] if config[:exit_codes] config[:exit_codes] = Array.wrap(config[:exit_codes]) else config.delete(:exit_codes) end end end |