diff options
Diffstat (limited to 'lib/gitlab/ci/config/header/input.rb')
-rw-r--r-- | lib/gitlab/ci/config/header/input.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/gitlab/ci/config/header/input.rb b/lib/gitlab/ci/config/header/input.rb new file mode 100644 index 00000000000..525b009afe3 --- /dev/null +++ b/lib/gitlab/ci/config/header/input.rb @@ -0,0 +1,24 @@ +# 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 |