summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-08 10:34:26 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-08 11:58:54 +0100
commit036c9c58ba04046241a2183ec98ad84fcfd0a5bf (patch)
tree99f47fe15bd0aff26e8676a70e76755ceefe5fbe /lib
parentb3b9817e5100ae2e827794d87ac6a6649571eddc (diff)
downloadgitlab-ce-036c9c58ba04046241a2183ec98ad84fcfd0a5bf.tar.gz
Limit parallel to 100limit-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')
-rw-r--r--lib/gitlab/ci/config/entry/job.rb3
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, ' \