Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Doits <markus.doits@stellenticket.de>2018-09-15 14:39:55 +0300
committerMarkus Doits <markus.doits@stellenticket.de>2018-11-07 15:00:38 +0300
commit473b52b2837bfffc634f574f148d949e218137ed (patch)
treee63cda26538ddfe356334b30771f9511bb3ed706 /app/models
parentd71a779740d1f667892e9bef798961e2a39a3a9c (diff)
add an option when to retry a build (unused yet)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/build.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 09b03278939..b133c756fcf 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -324,6 +324,11 @@ module Ci
retries.is_a?(Hash) && retries.fetch(:max, 0) || retries || 0
end
+ def retry_when
+ retries = self.options[:retry]
+ retries.is_a?(Hash) && retries.fetch(:when, 'always').to_s || 'always'
+ end
+
def latest?
!retried?
end