Commit bf8c7dc3 authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent fa936c68
...@@ -12,4 +12,8 @@ class GenericCommitStatus < CommitStatus ...@@ -12,4 +12,8 @@ class GenericCommitStatus < CommitStatus
def tags def tags
[:external] [:external]
end end
def has_trace?
false
end
end end
...@@ -165,12 +165,11 @@ ...@@ -165,12 +165,11 @@
- when GenericCommitStatus - when GenericCommitStatus
= build.name = build.name
%tr.build-log %tr.build-log
- case build - if build.has_trace?
- when Ci::Build
%td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"} %td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"}
%pre{style: "font-family:Monaco,'Lucida Console','Courier New',Courier,monospace;background-color:#fafafa;border-radius:3px;overflow:hidden;white-space:pre-wrap;word-break:break-all;font-size:13px;line-height:1.4;padding:12px;color:#333333;margin:0;"} %pre{style: "font-family:Monaco,'Lucida Console','Courier New',Courier,monospace;background-color:#fafafa;border-radius:3px;overflow:hidden;white-space:pre-wrap;word-break:break-all;font-size:13px;line-height:1.4;padding:12px;color:#333333;margin:0;"}
= build.trace_html(last_lines: 10).html_safe = build.trace_html(last_lines: 10).html_safe
- when GenericCommitStatus - else
%td{colspan: "2"} %td{colspan: "2"}
%tr.footer %tr.footer
%td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"} %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"}
......
...@@ -22,7 +22,7 @@ Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed. ...@@ -22,7 +22,7 @@ Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed.
Build #<%= build.id %><%= if build.kind_of?(Ci::Build) then " ( #{pipeline_build_url(@pipeline, build)} )" end %> Build #<%= build.id %><%= if build.kind_of?(Ci::Build) then " ( #{pipeline_build_url(@pipeline, build)} )" end %>
Stage: <%= build.stage %> Stage: <%= build.stage %>
Name: <%= build.name %> Name: <%= build.name %>
<% if build.kind_of?(Ci::Build) -%> <% if build.has_trace? -%>
Trace: <%= build.trace_with_state(last_lines: 10)[:text] %> Trace: <%= build.trace_with_state(last_lines: 10)[:text] %>
<% end -%> <% end -%>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment