Class: Gitlab::Ci::Pipeline::Chain::EvaluateWorkflowRules

Inherits:
Base
  • Object
show all
Includes:
Helpers, Utils::StrongMemoize
Defined in:
lib/gitlab/ci/pipeline/chain/evaluate_workflow_rules.rb

Instance Attribute Summary

Attributes inherited from Base

#command, #config, #pipeline

Instance Method Summary collapse

Methods included from Helpers

#error, #persist_pipeline?, #warning

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Ci::Pipeline::Chain::Base

Instance Method Details

#break?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'lib/gitlab/ci/pipeline/chain/evaluate_workflow_rules.rb', line 15

def break?
  @pipeline.errors.any? || @pipeline.persisted?
end

#perform!Object


11
12
13
# File 'lib/gitlab/ci/pipeline/chain/evaluate_workflow_rules.rb', line 11

def perform!
  error('Pipeline filtered out by workflow rules.') unless workflow_passed?
end