diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-08 12:34:26 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-08 13:58:54 +0300 |
commit | 036c9c58ba04046241a2183ec98ad84fcfd0a5bf (patch) | |
tree | 99f47fe15bd0aff26e8676a70e76755ceefe5fbe /lib/gitlab/ci | |
parent | b3b9817e5100ae2e827794d87ac6a6649571eddc (diff) |
Limit parallel to 100
This prevents some of the abusive behaviors, of someone putting 100000 and creating out of memory condition easily
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/config/entry/job.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb index 8e8c979f973..c8cb3248fa7 100644 --- a/lib/gitlab/ci/config/entry/job.rb +++ b/lib/gitlab/ci/config/entry/job.rb @@ -27,7 +27,8 @@ module Gitlab validates :tags, array_of_strings: true validates :allow_failure, boolean: true validates :parallel, numericality: { only_integer: true, - greater_than_or_equal_to: 2 } + greater_than_or_equal_to: 2, + less_than_or_equal_to: 50 } validates :when, inclusion: { in: %w[on_success on_failure always manual delayed], message: 'should be on_success, on_failure, ' \ |