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
30c122e2
Commit
30c122e2
authored
Nov 22, 2016
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-failed-email-for-external-jobs' into 'master'
External jobs do not have show page nor traces Fixes #24677 See merge request !7617
parents
c111ba6a
7ec8cc12
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
9 deletions
+25
-9
commit_status.rb
app/models/commit_status.rb
+7
-3
_build.html.haml
app/views/notify/links/ci/builds/_build.html.haml
+2
-0
_build.text.erb
app/views/notify/links/ci/builds/_build.text.erb
+1
-0
_generic_commit_status.html.haml
.../generic_commit_statuses/_generic_commit_status.html.haml
+1
-0
_generic_commit_status.text.erb
...s/generic_commit_statuses/_generic_commit_status.text.erb
+1
-0
pipeline_failed_email.html.haml
app/views/notify/pipeline_failed_email.html.haml
+7
-5
pipeline_failed_email.text.erb
app/views/notify/pipeline_failed_email.text.erb
+3
-1
pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+3
-0
No files found.
app/models/commit_status.rb
View file @
30c122e2
...
...
@@ -135,15 +135,19 @@ class CommitStatus < ActiveRecord::Base
allow_failure?
&&
(
failed?
||
canceled?
)
end
def
duration
calculate_duration
end
def
playable?
false
end
def
duration
calculate_duration
def
stuck?
false
end
def
stuck
?
def
has_trace
?
false
end
end
app/views/notify/links/ci/builds/_build.html.haml
0 → 100644
View file @
30c122e2
%a
{
href:
pipeline_build_url
(
pipeline
,
build
),
style:
"color:#3777b0;text-decoration:none;"
}
=
build
.
name
app/views/notify/links/ci/builds/_build.text.erb
0 → 100644
View file @
30c122e2
Build #
<%=
build
.
id
%>
(
<%=
pipeline_build_url
(
pipeline
,
build
)
%>
)
app/views/notify/links/generic_commit_statuses/_generic_commit_status.html.haml
0 → 100644
View file @
30c122e2
=
build
.
name
app/views/notify/links/generic_commit_statuses/_generic_commit_status.text.erb
0 → 100644
View file @
30c122e2
Build #
<%=
build
.
id
%>
app/views/notify/pipeline_failed_email.html.haml
View file @
30c122e2
...
...
@@ -158,12 +158,14 @@
%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;"
}
=
build
.
name
=
render
"notify/links/
#{
build
.
to_partial_path
}
"
,
pipeline:
@pipeline
,
build:
build
%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
-
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
-
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;"
}
%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 @
30c122e2
...
...
@@ -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
)
%>
)
<%=
render
"notify/links/
#{
build
.
to_partial_path
}
"
,
pipeline:
@pipeline
,
build:
build
%>
Stage:
<%=
build
.
stage
%>
Name:
<%=
build
.
name
%>
<%
if
build
.
has_trace?
-%>
Trace:
<%=
build
.
trace_with_state
(
last_lines:
10
)[
:text
]
%>
<%
end
-%>
<%
end
-%>
...
...
spec/models/ci/pipeline_spec.rb
View file @
30c122e2
...
...
@@ -571,6 +571,9 @@ describe Ci::Pipeline, models: true do
context
'with failed pipeline'
do
before
do
perform_enqueued_jobs
do
create
(
:ci_build
,
:failed
,
pipeline:
pipeline
)
create
(
:generic_commit_status
,
:failed
,
pipeline:
pipeline
)
pipeline
.
drop
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