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

list_config_variables_service.rb « ci « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b5dc192b5125687acb22a1fa41eef01152d72ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module Ci
  class ListConfigVariablesService < ::BaseService
    def execute(sha)
      config = project.ci_config_for(sha)
      return {} unless config

      result = Gitlab::Ci::YamlProcessor.new(config).execute
      result.valid? ? result.variables_with_data : {}
    end
  end
end