2019-12-04 20:38:33 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
class Config
|
|
|
|
module Entry
|
2021-01-03 14:25:43 +05:30
|
|
|
class Rules < ::Gitlab::Config::Entry::ComposableArray
|
2019-12-04 20:38:33 +05:30
|
|
|
include ::Gitlab::Config::Entry::Validatable
|
|
|
|
|
|
|
|
validations do
|
|
|
|
validates :config, presence: true
|
|
|
|
validates :config, type: Array
|
|
|
|
end
|
|
|
|
|
|
|
|
def value
|
|
|
|
@config
|
|
|
|
end
|
2021-01-03 14:25:43 +05:30
|
|
|
|
|
|
|
def composable_class
|
|
|
|
Entry::Rules::Rule
|
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|