Welcome to mirror list, hosted at ThFree Co, Russian Federation.

helpers.rb « chain « pipeline « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 982ecc0ff51cea95a00122d92aff5e44de24f38d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Gitlab
  module Ci
    module Pipeline
      module Chain
        module Helpers
          def error(message, config_error: false, drop_reason: nil)
            if config_error && command.save_incompleted
              drop_reason = :config_error
              pipeline.yaml_errors = message
            end

            pipeline.drop!(drop_reason) if drop_reason
            pipeline.errors.add(:base, message)
          end
        end
      end
    end
  end
end