Skip to content
Snippets Groups Projects
Commit 72f02953 authored by Douwe Maan's avatar Douwe Maan
Browse files

Add and use Ci::Build#retryable? method.

parent dd36282a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -40,7 +40,7 @@ class Projects::BuildsController < Projects::ApplicationController
end
 
def retry
if @build.commands.blank?
unless @build.retryable?
return page_404
end
 
Loading
Loading
Loading
Loading
@@ -106,6 +106,9 @@ module Ci
failed? && allow_failure?
end
 
def retryable?
commands.present?
end
def trace_html
html = Ci::Ansi2html::convert(trace) if trace.present?
html || ''
Loading
Loading
@@ -222,7 +225,7 @@ module Ci
end
 
def retry_url
if commands.present?
if retryable?
Gitlab::Application.routes.url_helpers.
retry_namespace_project_build_path(gl_project.namespace, gl_project, self)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment