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

terraform_reports.rb « reports « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f955d007daf553689e79fb8c0616c83a565f220e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

module Gitlab
  module Ci
    module Reports
      class TerraformReports
        attr_reader :plans

        def initialize
          @plans = {}
        end

        def pick(keys)
          terraform_plans = plans.select do |key|
            keys.include?(key)
          end

          { plans: terraform_plans }
        end

        def add_plan(name, plan)
          plans[name] = plan
        end
      end
    end
  end
end