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
Tatuya Kamada
gitlab-ce
Commits
3d38e461
Commit
3d38e461
authored
Apr 13, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support skipped status
parent
9e68109f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
app/models/concerns/ci_status.rb
app/models/concerns/ci_status.rb
+3
-0
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+1
-1
No files found.
app/models/concerns/ci_status.rb
View file @
3d38e461
...
@@ -12,12 +12,14 @@ module CiStatus
...
@@ -12,12 +12,14 @@ module CiStatus
pending
=
all
.
pending
.
select
(
'count(*)'
).
to_sql
pending
=
all
.
pending
.
select
(
'count(*)'
).
to_sql
running
=
all
.
running
.
select
(
'count(*)'
).
to_sql
running
=
all
.
running
.
select
(
'count(*)'
).
to_sql
canceled
=
all
.
canceled
.
select
(
'count(*)'
).
to_sql
canceled
=
all
.
canceled
.
select
(
'count(*)'
).
to_sql
skipped
=
all
.
skipped
.
select
(
'count(*)'
).
to_sql
deduce_status
=
"(CASE
deduce_status
=
"(CASE
WHEN (
#{
builds
}
)=0 THEN 'skipped'
WHEN (
#{
builds
}
)=0 THEN 'skipped'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
ignored
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
ignored
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
pending
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
pending
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
canceled
}
) THEN 'canceled'
WHEN (
#{
builds
}
)=(
#{
canceled
}
) THEN 'canceled'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 'skipped'
WHEN (
#{
running
}
)+(
#{
pending
}
)>0 THEN 'running'
WHEN (
#{
running
}
)+(
#{
pending
}
)>0 THEN 'running'
ELSE 'failed'
ELSE 'failed'
END)"
END)"
...
@@ -52,6 +54,7 @@ module CiStatus
...
@@ -52,6 +54,7 @@ module CiStatus
scope
:success
,
->
{
where
(
status:
'success'
)
}
scope
:success
,
->
{
where
(
status:
'success'
)
}
scope
:failed
,
->
{
where
(
status:
'failed'
)
}
scope
:failed
,
->
{
where
(
status:
'failed'
)
}
scope
:canceled
,
->
{
where
(
status:
'canceled'
)
}
scope
:canceled
,
->
{
where
(
status:
'canceled'
)
}
scope
:skipped
,
->
{
where
(
status:
'skipped'
)
}
scope
:running_or_pending
,
->
{
where
(
status:
[
:running
,
:pending
])
}
scope
:running_or_pending
,
->
{
where
(
status:
[
:running
,
:pending
])
}
scope
:finished
,
->
{
where
(
status:
[
:success
,
:failed
,
:canceled
])
}
scope
:finished
,
->
{
where
(
status:
[
:success
,
:failed
,
:canceled
])
}
end
end
...
...
features/steps/dashboard/dashboard.rb
View file @
3d38e461
...
@@ -13,7 +13,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
...
@@ -13,7 +13,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
end
step
'I should see "Shop" project CI status'
do
step
'I should see "Shop" project CI status'
do
expect
(
page
).
to
have_link
"Build skipped"
expect
(
page
).
to
have_link
"Build
:
skipped"
end
end
step
'I should see last push widget'
do
step
'I should see last push widget'
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