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

input.rb « header « config « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7f0edaaac4cb4f59dba07d133b98873698e85a8c (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
# frozen_string_literal: true

module Gitlab
  module Ci
    class Config
      module Header
        ##
        # Input parameter used for interpolation with the CI configuration.
        #
        class Input < ::Gitlab::Config::Entry::Node
          include ::Gitlab::Config::Entry::Validatable
          include ::Gitlab::Config::Entry::Attributable

          attributes :default, prefix: :input

          validations do
            validates :config, type: Hash, allowed_keys: [:default]
            validates :key, alphanumeric: true
            validates :input_default, alphanumeric: true, allow_nil: true
          end
        end
      end
    end
  end
end