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

if.rb « clause « rule « rules « build « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6143a736ca650c987b2b42a7f0ed629b95a83e61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Gitlab
  module Ci
    module Build
      class Rules::Rule::Clause::If < Rules::Rule::Clause
        def initialize(expression)
          @expression = expression
        end

        def satisfied_by?(pipeline, context)
          ::Gitlab::Ci::Pipeline::Expression::Statement.new(
            @expression, context.variables).truthful?
        end
      end
    end
  end
end