blob: 341f87b44abe90aa30f54b6cea4036d95919017b (
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
|
# frozen_string_literal: true
module Gitlab
module Ci
class Config
module Entry
##
# Entry that represents a job script.
#
class Commands < ::Gitlab::Config::Entry::Node
include ::Gitlab::Config::Entry::Validatable
MAX_NESTING_LEVEL = 10
validations do
validates :config, string_or_nested_array_of_strings: { max_level: MAX_NESTING_LEVEL }
end
def value
Array(@config).flatten(MAX_NESTING_LEVEL)
end
end
end
end
end
end
|