Class: Gitlab::Ci::Build::Rules::Result
- Inherits:
-
Struct
- Object
- Struct
- Gitlab::Ci::Build::Rules::Result
- Defined in:
- lib/gitlab/ci/build/rules.rb
Instance Attribute Summary collapse
-
#allow_failure ⇒ Object
Returns the value of attribute allow_failure.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#needs ⇒ Object
Returns the value of attribute needs.
-
#start_in ⇒ Object
Returns the value of attribute start_in.
-
#variables ⇒ Object
Returns the value of attribute variables.
-
#when ⇒ Object
Returns the value of attribute when.
Instance Method Summary collapse
Instance Attribute Details
#allow_failure ⇒ Object
Returns the value of attribute allow_failure
9 10 11 |
# File 'lib/gitlab/ci/build/rules.rb', line 9 def allow_failure @allow_failure end |
#errors ⇒ Object
Returns the value of attribute errors
9 10 11 |
# File 'lib/gitlab/ci/build/rules.rb', line 9 def errors @errors end |
#needs ⇒ Object
Returns the value of attribute needs
9 10 11 |
# File 'lib/gitlab/ci/build/rules.rb', line 9 def needs @needs end |
#start_in ⇒ Object
Returns the value of attribute start_in
9 10 11 |
# File 'lib/gitlab/ci/build/rules.rb', line 9 def start_in @start_in end |
#variables ⇒ Object
Returns the value of attribute variables
9 10 11 |
# File 'lib/gitlab/ci/build/rules.rb', line 9 def variables @variables end |
#when ⇒ Object
Returns the value of attribute when
9 10 11 |
# File 'lib/gitlab/ci/build/rules.rb', line 9 def when @when end |
Instance Method Details
#build_attributes ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gitlab/ci/build/rules.rb', line 10 def build_attributes needs_job = needs&.dig(:job) { when: self.when, options: { start_in: start_in }.compact, allow_failure: allow_failure, scheduling_type: (:dag if needs_job.present?), needs_attributes: needs_job }.compact end |
#pass? ⇒ Boolean
21 22 23 |
# File 'lib/gitlab/ci/build/rules.rb', line 21 def pass? self.when != 'never' end |