blob: 28bc2e4e7ce8a4705f67a8eb4d245fc0fc3c8ecc (
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 Entry
class Hooks < ::Gitlab::Config::Entry::Node
# `Configurable` alreadys adds `Validatable`
include ::Gitlab::Config::Entry::Configurable
# NOTE: If a new hook is added, inheriting should be changed because a `job:hooks` overrides all
# `default:hooks` now. We should implement merging; each hook must be overridden individually.
ALLOWED_HOOKS = %i[pre_get_sources_script].freeze
validations do
validates :config, type: Hash, allowed_keys: ALLOWED_HOOKS
end
entry :pre_get_sources_script, Entry::Commands,
description: 'Commands that will be executed on Runner before cloning/fetching the Git repository.'
end
end
end
end
end
|