summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ci/yaml/README.md2
-rw-r--r--lib/gitlab/ci/config/entry/job.rb2
-rw-r--r--spec/lib/gitlab/ci/config/entry/job_spec.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 6b17af1394a..808a23df554 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -1147,7 +1147,7 @@ up to the amount of times specified by the `retry` keyword.
If `retry` is set to 3, and a job succeeds in a second run, it won't be retried
again. `retry` value has to be a positive integer, equal or larger than 0, but
-lower than 10.
+lower or equal to 2 (two retries maximum, three runs in total).
A simple example:
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb
index 5f1144894b5..32f5c6ab142 100644
--- a/lib/gitlab/ci/config/entry/job.rb
+++ b/lib/gitlab/ci/config/entry/job.rb
@@ -25,7 +25,7 @@ module Gitlab
validates :allow_failure, boolean: true
validates :retry, numericality: { only_integer: true,
greater_than_or_equal_to: 0,
- less_than: 10 }
+ less_than_or_equal_to: 2 }
validates :when,
inclusion: { in: %w[on_success on_failure always manual],
message: 'should be on_success, on_failure, ' \
diff --git a/spec/lib/gitlab/ci/config/entry/job_spec.rb b/spec/lib/gitlab/ci/config/entry/job_spec.rb
index f8ed59a3a44..6769f64f950 100644
--- a/spec/lib/gitlab/ci/config/entry/job_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/job_spec.rb
@@ -115,7 +115,7 @@ describe Gitlab::Ci::Config::Entry::Job do
it 'returns error about value too high' do
expect(entry).not_to be_valid
- expect(entry.errors).to include 'job retry must be less than 10'
+ expect(entry.errors).to include 'job retry must be less than or equal to 2'
end
end
end