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

inherit.rb « entry « config « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 540f1e62c6c6efc9d76a9e2922feeb1db89e6cdb (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
28
29
30
# frozen_string_literal: true

module Gitlab
  module Ci
    class Config
      module Entry
        ##
        # This class represents a inherit entry
        #
        class Inherit < ::Gitlab::Config::Entry::Node
          include ::Gitlab::Config::Entry::Configurable

          ALLOWED_KEYS = %i[default variables].freeze

          validations do
            validates :config, allowed_keys: ALLOWED_KEYS
          end

          entry :default, ::Gitlab::Config::Entry::Boolean,
            description: 'Indicates whether to inherit `default:`.',
            default: true

          entry :variables, ::Gitlab::Config::Entry::Boolean,
            description: 'Indicates whether to inherit `variables:`.',
            default: true
        end
      end
    end
  end
end