diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-21 20:29:34 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-21 20:29:34 +0800 |
commit | fa936c68083810043b8c84fcbcad9fb3ce717eb6 (patch) | |
tree | d6d9ca7a6c49e93054568ff068996a1d0f668d80 /app/views/notify | |
parent | 900999f8180e49aa1677286e3e0cfa08d47829a7 (diff) | |
download | gitlab-ce-fa936c68083810043b8c84fcbcad9fb3ce717eb6.tar.gz |
External jobs do not have show page nor traces
Fixes #24677
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/pipeline_failed_email.html.haml | 16 | ||||
-rw-r--r-- | app/views/notify/pipeline_failed_email.text.erb | 4 |
2 files changed, 15 insertions, 5 deletions
diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index 38c852f0a3a..a540a080768 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -158,12 +158,20 @@ %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#8c8c8c;font-weight:500;font-size:15px;vertical-align:middle;"} = build.stage %td{align: "right", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:20px 0;color:#8c8c8c;font-weight:500;font-size:15px;"} - %a{href: pipeline_build_url(@pipeline, build), style: "color:#3777b0;text-decoration:none;"} + - case build + - when Ci::Build + %a{href: pipeline_build_url(@pipeline, build), style: "color:#3777b0;text-decoration:none;"} + = build.name + - when GenericCommitStatus = build.name %tr.build-log - %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;"} - = build.trace_html(last_lines: 10).html_safe + - case build + - when Ci::Build + %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;"} + = build.trace_html(last_lines: 10).html_safe + - when GenericCommitStatus + %td{colspan: "2"} %tr.footer %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"} %img{alt: "GitLab", height: "33", src: image_url('mailers/ci_pipeline_notif_v1/gitlab-logo-full-horizontal.gif'), style: "display:block;margin:0 auto 1em;", width: "90"}/ diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index 8f8084b58e1..88473532482 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -19,10 +19,12 @@ Commit Author: <%= commit.author_name %> Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>. <% failed.each do |build| -%> -Build #<%= build.id %> ( <%= pipeline_build_url(@pipeline, build) %> ) +Build #<%= build.id %><%= if build.kind_of?(Ci::Build) then " ( #{pipeline_build_url(@pipeline, build)} )" end %> Stage: <%= build.stage %> Name: <%= build.name %> +<% if build.kind_of?(Ci::Build) -%> Trace: <%= build.trace_with_state(last_lines: 10)[:text] %> +<% end -%> <% end -%> |