BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bf8c7dc3
Commit
bf8c7dc3
authored
Nov 21, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use has_trace? instead of case switch, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18745170
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18745221
parent
fa936c68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
generic_commit_status.rb
app/models/generic_commit_status.rb
+4
-0
pipeline_failed_email.html.haml
app/views/notify/pipeline_failed_email.html.haml
+2
-3
pipeline_failed_email.text.erb
app/views/notify/pipeline_failed_email.text.erb
+1
-1
No files found.
app/models/generic_commit_status.rb
View file @
bf8c7dc3
...
...
@@ -12,4 +12,8 @@ class GenericCommitStatus < CommitStatus
def
tags
[
:external
]
end
def
has_trace?
false
end
end
app/views/notify/pipeline_failed_email.html.haml
View file @
bf8c7dc3
...
...
@@ -165,12 +165,11 @@
-
when
GenericCommitStatus
=
build
.
name
%tr
.build-log
-
case
build
-
when
Ci
::
Build
-
if
build
.
has_trace?
%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
-
else
%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;"
}
...
...
app/views/notify/pipeline_failed_email.text.erb
View file @
bf8c7dc3
...
...
@@ -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
%>
Stage:
<%=
build
.
stage
%>
Name:
<%=
build
.
name
%>
<%
if
build
.
kind_of?
(
Ci
::
Build
)
-%>
<%
if
build
.
has_trace?
-%>
Trace:
<%=
build
.
trace_with_state
(
last_lines:
10
)[
:text
]
%>
<%
end
-%>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment