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, #warning

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)


17
18
19
# File 'lib/gitlab/ci/pipeline/chain/evaluate_workflow_rules.rb', line 17

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

#perform!Object



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

def perform!
  @command.workflow_rules_result = workflow_rules_result

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