debian-mirror-gitlab/lib/gitlab/ci/build/rules/rule/clause/if.rb
2022-04-04 11:22:00 +05:30

18 lines
421 B
Ruby

# 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_hash).truthful?
end
end
end
end
end