debian-mirror-gitlab/lib/gitlab/ci/variables/builder/instance.rb
2022-04-04 11:22:00 +05:30

23 lines
564 B
Ruby

# frozen_string_literal: true
module Gitlab
module Ci
module Variables
class Builder
class Instance
include Gitlab::Utils::StrongMemoize
def secret_variables(protected_ref: false)
variables = if protected_ref
::Ci::InstanceVariable.all_cached
else
::Ci::InstanceVariable.unprotected_cached
end
Gitlab::Ci::Variables::Collection.new(variables)
end
end
end
end
end
end