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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d64ab8df
Commit
d64ab8df
authored
Jun 07, 2018
by
André Luís
Committed by
Phil Hughes
Jun 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Show `failure_reason` and improve failed jobs tab in pipeline detail view"
parent
d2aa3e3d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
220 additions
and
25 deletions
+220
-25
app/assets/stylesheets/framework/tables.scss
app/assets/stylesheets/framework/tables.scss
+83
-1
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+8
-8
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+80
-6
app/views/projects/pipelines/_with_tabs.html.haml
app/views/projects/pipelines/_with_tabs.html.haml
+34
-10
changelogs/unreleased/44267-improve-failed-jobs-tab.yml
changelogs/unreleased/44267-improve-failed-jobs-tab.yml
+5
-0
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+10
-0
No files found.
app/assets/stylesheets/framework/tables.scss
View file @
d64ab8df
...
@@ -39,6 +39,11 @@ table {
...
@@ -39,6 +39,11 @@ table {
&
.wide
{
&
.wide
{
width
:
55%
;
width
:
55%
;
}
}
&
.table-th-transparent
{
background
:
none
;
color
:
$gl-text-color-secondary
;
}
}
}
td
{
td
{
...
@@ -46,9 +51,86 @@ table {
...
@@ -46,9 +51,86 @@ table {
}
}
}
}
}
}
&
.responsive-table
{
@include
media-breakpoint-down
(
sm
)
{
thead
{
display
:
none
;
}
td
{
display
:
block
;
color
:
$gl-text-color-secondary
;
}
tbody
td
.responsive-table-cell
{
padding
:
$gl-padding
0
;
width
:
100%
;
display
:
flex
;
text-align
:
right
;
align-items
:
center
;
justify-content
:
space-between
;
&
[
data-column
]
::before
{
content
:
attr
(
data-column
);
display
:
block
;
text-align
:
left
;
padding-right
:
$gl-padding
;
color
:
$gl-text-color-secondary
;
}
&
:not
([
data-column
])
{
flex-direction
:
row-reverse
;
}
}
tr
.responsive-table-border-start
,
tr
.responsive-table-border-end
{
display
:
block
;
border
:
solid
$gl-text-color-quaternary
;
padding-left
:
0
;
padding-right
:
0
;
>
td
{
border-color
:
$gl-text-color-quaternary
;
&
,
&
:last-child
{
padding-left
:
$gl-padding
;
padding-right
:
$gl-padding
;
}
}
}
tr
.responsive-table-border-start
{
border-width
:
1px
1px
0
;
border-radius
:
$border-radius-default
$border-radius-default
0
0
;
padding-top
:
0
;
padding-bottom
:
0
;
>
td
:first-child
{
border-top
:
0
;
// always have the <table> top border
}
>
td
:last-child
{
border-bottom
:
1px
solid
$gl-text-color-quaternary
;
}
}
tr
.responsive-table-border-end
{
border-width
:
0
1px
1px
;
border-radius
:
0
0
$border-radius-default
$border-radius-default
;
margin-bottom
:
2
*
$gl-padding
;
>
:last-child
{
border-bottom
:
0
;
}
}
}
}
}
}
.responsive-table
{
.responsive-table
:not
(
table
)
{
@include
media-breakpoint-down
(
sm
)
{
@include
media-breakpoint-down
(
sm
)
{
th
{
th
{
width
:
100%
;
width
:
100%
;
...
...
app/assets/stylesheets/pages/builds.scss
View file @
d64ab8df
...
@@ -12,26 +12,22 @@
...
@@ -12,26 +12,22 @@
@keyframes
blinking-dots
{
@keyframes
blinking-dots
{
0
%
{
0
%
{
background-color
:
rgba
(
$white-light
,
1
);
background-color
:
rgba
(
$white-light
,
1
);
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
0
.2
)
,
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
0
.2
)
,
24px
0
0
0
rgba
(
$white-light
,
0
.2
);
24px
0
0
0
rgba
(
$white-light
,
0
.2
);
}
}
25
%
{
25
%
{
background-color
:
rgba
(
$white-light
,
0
.4
);
background-color
:
rgba
(
$white-light
,
0
.4
);
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
2
)
,
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
2
)
,
24px
0
0
0
rgba
(
$white-light
,
0
.2
);
24px
0
0
0
rgba
(
$white-light
,
0
.2
);
}
}
75
%
{
75
%
{
background-color
:
rgba
(
$white-light
,
0
.4
);
background-color
:
rgba
(
$white-light
,
0
.4
);
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
0
.2
)
,
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
0
.2
)
,
24px
0
0
0
rgba
(
$white-light
,
1
);
24px
0
0
0
rgba
(
$white-light
,
1
);
}
}
100
%
{
100
%
{
background-color
:
rgba
(
$white-light
,
1
);
background-color
:
rgba
(
$white-light
,
1
);
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
0
.2
)
,
box-shadow
:
12px
0
0
0
rgba
(
$white-light
,
0
.2
)
,
24px
0
0
0
rgba
(
$white-light
,
0
.2
);
24px
0
0
0
rgba
(
$white-light
,
0
.2
);
}
}
}
}
...
@@ -71,6 +67,10 @@
...
@@ -71,6 +67,10 @@
.bash
{
.bash
{
display
:
block
;
display
:
block
;
}
}
&
.build-trace-rounded
{
border-radius
:
$border-radius-base
;
}
}
}
.top-bar
{
.top-bar
{
...
...
app/assets/stylesheets/pages/pipelines.scss
View file @
d64ab8df
...
@@ -321,18 +321,17 @@
...
@@ -321,18 +321,17 @@
}
}
.build-failures
{
.build-failures
{
th
{
border-top
:
0
;
}
.build-state
{
.build-state
{
padding
:
20px
2px
;
padding
:
20px
2px
;
.build-name
{
.build-name
{
float
:
right
;
font-weight
:
$gl-font-weight-normal
;
font-weight
:
$gl-font-weight-normal
;
}
}
.ci-status-icon-failed
svg
{
vertical-align
:
middle
;
}
.stage
{
.stage
{
color
:
$gl-text-color-secondary
;
color
:
$gl-text-color-secondary
;
font-weight
:
$gl-font-weight-normal
;
font-weight
:
$gl-font-weight-normal
;
...
@@ -344,6 +343,81 @@
...
@@ -344,6 +343,81 @@
border
:
0
;
border
:
0
;
line-height
:
initial
;
line-height
:
initial
;
}
}
.build-trace-row
td
{
border-top
:
0
;
border-bottom-width
:
1px
;
border-bottom-style
:
solid
;
padding-top
:
0
;
}
.build-trace
{
width
:
100%
;
text-align
:
left
;
margin-top
:
$gl-padding
;
}
.build-name
{
width
:
196px
;
a
{
font-weight
:
$gl-font-weight-bold
;
color
:
$gl-text-color
;
text-decoration
:
none
;
&
:focus
,
&
:hover
{
text-decoration
:
underline
;
}
}
}
.build-actions
{
width
:
70px
;
text-align
:
right
;
}
.build-stage
{
width
:
140px
;
}
.ci-status-icon-failed
{
padding
:
10px
0
10px
12px
;
width
:
12px
+
24px
;
// padding-left + svg width
}
.build-icon
svg
{
width
:
24px
;
height
:
24px
;
vertical-align
:
middle
;
}
.build-state
,
.build-trace-row
{
>
td
:last-child
{
padding-right
:
0
;
}
}
@include
media-breakpoint-down
(
sm
)
{
td
:empty
{
display
:
none
;
}
.ci-table
{
margin-top
:
2
*
$gl-padding
;
}
.build-trace-container
{
padding-top
:
$gl-padding
;
padding-bottom
:
$gl-padding
;
}
.build-trace
{
margin-bottom
:
0
;
margin-top
:
0
;
}
}
}
}
.pipeline-tab-content
{
.pipeline-tab-content
{
...
@@ -929,7 +1003,7 @@ button.mini-pipeline-graph-dropdown-toggle {
...
@@ -929,7 +1003,7 @@ button.mini-pipeline-graph-dropdown-toggle {
&
.dropdown-menu
{
&
.dropdown-menu
{
transform
:
translate
(
-80%
,
0
);
transform
:
translate
(
-80%
,
0
);
@media
(
min-width
:
map-get
(
$grid-breakpoints
,
md
))
{
@media
(
min-width
:
map-get
(
$grid-breakpoints
,
md
))
{
transform
:
translate
(
-50%
,
0
);
transform
:
translate
(
-50%
,
0
);
right
:
auto
;
right
:
auto
;
left
:
50%
;
left
:
50%
;
...
...
app/views/projects/pipelines/_with_tabs.html.haml
View file @
d64ab8df
...
@@ -43,12 +43,36 @@
...
@@ -43,12 +43,36 @@
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
legacy_stages
,
as: :stage
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
legacy_stages
,
as: :stage
-
if
@pipeline
.
failed_builds
.
present?
-
if
@pipeline
.
failed_builds
.
present?
#js-tab-failures
.build-failures.tab-pane
#js-tab-failures
.build-failures.tab-pane.build-page
%table
.table.responsive-table.ci-table.responsive-table-sm-rounded
%thead
%th
.table-th-transparent
%th
.table-th-transparent
=
_
(
"Name"
)
%th
.table-th-transparent
=
_
(
"Stage"
)
%th
.table-th-transparent
=
_
(
"Failure"
)
%tbody
-
@pipeline
.
failed_builds
.
each_with_index
do
|
build
,
index
|
-
@pipeline
.
failed_builds
.
each_with_index
do
|
build
,
index
|
.build-state
-
job
=
build
.
present
(
current_user:
current_user
)
%span
.ci-status-icon-failed
=
custom_icon
(
'icon_status_failed'
)
%tr
.build-state.responsive-table-border-start
%span
.stage
%td
.responsive-table-cell.ci-status-icon-failed
{
data:
{
column:
"Status"
}
}
=
build
.
stage
.
titleize
.d-none.d-md-block.build-icon
%span
.build-name
=
custom_icon
(
"icon_status_
#{
build
.
status
}
"
)
.d-md-none.build-badge
=
render
"ci/status/badge"
,
link:
false
,
status:
job
.
detailed_status
(
current_user
)
%td
.responsive-table-cell.build-name
{
data:
{
column:
_
(
"Name"
)}
}
=
link_to
build
.
name
,
pipeline_job_url
(
pipeline
,
build
)
=
link_to
build
.
name
,
pipeline_job_url
(
pipeline
,
build
)
%pre
.build-log
=
build_summary
(
build
,
skip:
index
>=
10
)
%td
.responsive-table-cell.build-stage
{
data:
{
column:
_
(
"Stage"
)}
}
=
build
.
stage
.
titleize
%td
.responsive-table-cell.build-failure
{
data:
{
column:
_
(
"Failure"
)}
}
=
build
.
present
.
callout_failure_message
%td
.responsive-table-cell.build-actions
=
link_to
retry_project_job_path
(
build
.
project
,
build
,
return_to:
request
.
original_url
),
method: :post
,
title:
_
(
'Retry'
),
class:
'btn btn-build'
do
=
icon
(
'repeat'
)
%tr
.build-trace-row.responsive-table-border-end
%td
%td
.responsive-table-cell.build-trace-container
{
colspan:
4
}
%pre
.build-trace.build-trace-rounded
%code
.bash.js-build-output
=
build_summary
(
build
)
changelogs/unreleased/44267-improve-failed-jobs-tab.yml
0 → 100644
View file @
d64ab8df
---
title
:
Improve Failed Jobs tab in the Pipeline detail page
merge_request
:
author
:
type
:
changed
spec/features/projects/pipelines/pipeline_spec.rb
View file @
d64ab8df
...
@@ -344,6 +344,16 @@ describe 'Pipeline', :js do
...
@@ -344,6 +344,16 @@ describe 'Pipeline', :js do
it
'shows build failure logs'
do
it
'shows build failure logs'
do
expect
(
page
).
to
have_content
(
'4 examples, 1 failure'
)
expect
(
page
).
to
have_content
(
'4 examples, 1 failure'
)
end
end
it
'shows the failure reason'
do
expect
(
page
).
to
have_content
(
'There is an unknown failure, please try again'
)
end
it
'shows retry button for failed build'
do
page
.
within
(
find
(
'.build-failures'
,
match: :first
))
do
expect
(
page
).
to
have_link
(
'Retry'
)
end
end
end
end
context
'when missing build logs'
do
context
'when missing build logs'
do
...
...
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