debian-mirror-gitlab/lib/gitlab/ci/config/entry/rules.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
522 B
Ruby
Raw Normal View History

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
2021-10-27 15:23:28 +05:30
[@config].flatten
2019-12-04 20:38:33 +05:30
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