Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
fa936c68
Commit
fa936c68
authored
Nov 21, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
External jobs do not have show page nor traces
Fixes #24677
parent
900999f8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
app/views/notify/pipeline_failed_email.html.haml
app/views/notify/pipeline_failed_email.html.haml
+12
-4
app/views/notify/pipeline_failed_email.text.erb
app/views/notify/pipeline_failed_email.text.erb
+3
-1
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+7
-1
No files found.
app/views/notify/pipeline_failed_email.html.haml
View file @
fa936c68
...
@@ -158,12 +158,20 @@
...
@@ -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;"
}
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#8c8c8c;font-weight:500;font-size:15px;vertical-align:middle;"
}
=
build
.
stage
=
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;"
}
%td
{
align:
"right"
,
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:20px 0;color:#8c8c8c;font-weight:500;font-size:15px;"
}
-
case
build
-
when
Ci
::
Build
%a
{
href:
pipeline_build_url
(
@pipeline
,
build
),
style:
"color:#3777b0;text-decoration:none;"
}
%a
{
href:
pipeline_build_url
(
@pipeline
,
build
),
style:
"color:#3777b0;text-decoration:none;"
}
=
build
.
name
=
build
.
name
-
when
GenericCommitStatus
=
build
.
name
%tr
.build-log
%tr
.build-log
-
case
build
-
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
%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;"
}
%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"
}
/
%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"
}
/
...
...
app/views/notify/pipeline_failed_email.text.erb
View file @
fa936c68
...
@@ -19,10 +19,12 @@ Commit Author: <%= commit.author_name %>
...
@@ -19,10 +19,12 @@ Commit Author: <%= commit.author_name %>
Pipeline #
<%=
@pipeline
.
id
%>
(
<%=
pipeline_url
(
@pipeline
)
%>
) had
<%=
failed
.
size
%>
failed
<%=
'build'
.
pluralize
(
failed
.
size
)
%>
.
Pipeline #
<%=
@pipeline
.
id
%>
(
<%=
pipeline_url
(
@pipeline
)
%>
) had
<%=
failed
.
size
%>
failed
<%=
'build'
.
pluralize
(
failed
.
size
)
%>
.
<%
failed
.
each
do
|
build
|
-%>
<%
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
%>
Stage:
<%=
build
.
stage
%>
Name:
<%=
build
.
name
%>
Name:
<%=
build
.
name
%>
<%
if
build
.
kind_of?
(
Ci
::
Build
)
-%>
Trace:
<%=
build
.
trace_with_state
(
last_lines:
10
)[
:text
]
%>
Trace:
<%=
build
.
trace_with_state
(
last_lines:
10
)[
:text
]
%>
<%
end
-%>
<%
end
-%>
<%
end
-%>
...
...
spec/models/ci/pipeline_spec.rb
View file @
fa936c68
...
@@ -571,7 +571,13 @@ describe Ci::Pipeline, models: true do
...
@@ -571,7 +571,13 @@ describe Ci::Pipeline, models: true do
context
'with failed pipeline'
do
context
'with failed pipeline'
do
before
do
before
do
perform_enqueued_jobs
do
perform_enqueued_jobs
do
pipeline
.
drop
create
(
:ci_build
,
:created
,
pipeline:
pipeline
)
create
(
:generic_commit_status
,
:created
,
pipeline:
pipeline
)
pipeline
.
statuses
.
count
.
times
do
|
offset
|
# workaround race conditions
pipeline
.
statuses
.
offset
(
offset
).
first
.
drop
end
end
end
end
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