diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-10-05 10:40:42 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-10-05 10:40:42 +0000 |
commit | 7bdbacb489aa2a74e57fd863501b2b0af020d04a (patch) | |
tree | 72c6e774266a15cfa9a503107879ce65efe46348 /lib/gitlab/ci/config/entry/policy.rb | |
parent | ae014e189773f7299c12c1050334b3e8fe7b15d8 (diff) | |
parent | 33cf61716446c9fd1295f8a80bfeb2e600bd8f7d (diff) | |
download | gitlab-ce-7bdbacb489aa2a74e57fd863501b2b0af020d04a.tar.gz |
Merge branch 'feature/gb/pipeline-only-except-with-modified-paths' into 'master'
Pipeline only/except for modified paths
See merge request gitlab-org/gitlab-ce!21981
Diffstat (limited to 'lib/gitlab/ci/config/entry/policy.rb')
-rw-r--r-- | lib/gitlab/ci/config/entry/policy.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/ci/config/entry/policy.rb b/lib/gitlab/ci/config/entry/policy.rb index 09e8e52b60f..c92562f8c85 100644 --- a/lib/gitlab/ci/config/entry/policy.rb +++ b/lib/gitlab/ci/config/entry/policy.rb @@ -25,17 +25,19 @@ module Gitlab include Entry::Validatable include Entry::Attributable - attributes :refs, :kubernetes, :variables + ALLOWED_KEYS = %i[refs kubernetes variables changes].freeze + attributes :refs, :kubernetes, :variables, :changes validations do validates :config, presence: true - validates :config, allowed_keys: %i[refs kubernetes variables] + validates :config, allowed_keys: ALLOWED_KEYS validate :variables_expressions_syntax with_options allow_nil: true do validates :refs, array_of_strings_or_regexps: true validates :kubernetes, allowed_values: %w[active] validates :variables, array_of_strings: true + validates :changes, array_of_strings: true end def variables_expressions_syntax |