debian-mirror-gitlab/lib/gitlab/ci/build/rules/rule/clause/if.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
421 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
module Build
class Rules::Rule::Clause::If < Rules::Rule::Clause
def initialize(expression)
@expression = expression
end
2022-04-04 11:22:00 +05:30
def satisfied_by?(_pipeline, context)
2019-12-26 22:10:19 +05:30
::Gitlab::Ci::Pipeline::Expression::Statement.new(
2022-01-26 12:08:38 +05:30
@expression, context.variables_hash).truthful?
2019-12-04 20:38:33 +05:30
end
end
end
end
end