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
|
|
|
|
|
2019-12-26 22:10:19 +05:30
|
|
|
def satisfied_by?(pipeline, context)
|
|
|
|
::Gitlab::Ci::Pipeline::Expression::Statement.new(
|
|
|
|
@expression, context.variables).truthful?
|
2019-12-04 20:38:33 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|