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
6d80b94a
Commit
6d80b94a
authored
Dec 05, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of skipped vs success status
parent
13cee6d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/concerns/has_status.rb
app/models/concerns/has_status.rb
+3
-3
app/services/ci/process_pipeline_service.rb
app/services/ci/process_pipeline_service.rb
+2
-2
No files found.
app/models/concerns/has_status.rb
View file @
6d80b94a
...
...
@@ -4,7 +4,7 @@ module HasStatus
AVAILABLE_STATUSES
=
%w[created pending running success failed canceled skipped]
STARTED_STATUSES
=
%w[running success failed skipped]
ACTIVE_STATUSES
=
%w[pending running]
COMPLETED_STATUSES
=
%w[success failed canceled]
COMPLETED_STATUSES
=
%w[success failed canceled
skipped
]
ORDERED_STATUSES
=
%w[failed pending running canceled success skipped]
class_methods
do
...
...
@@ -23,9 +23,9 @@ module HasStatus
canceled
=
scope
.
canceled
.
select
(
'count(*)'
).
to_sql
"(CASE
WHEN (
#{
builds
}
)=(
#{
s
uccess
}
) THEN 'success
'
WHEN (
#{
builds
}
)=(
#{
s
kipped
}
) THEN 'skipped
'
WHEN (
#{
builds
}
)=(
#{
created
}
) THEN 'created'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
skipped
}
) THEN 's
kipped
'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
skipped
}
) THEN 's
uccess
'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
skipped
}
)+(
#{
canceled
}
) THEN 'canceled'
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
skipped
}
)+(
#{
pending
}
) THEN 'pending'
WHEN (
#{
running
}
)+(
#{
pending
}
)+(
#{
created
}
)>0 THEN 'running'
...
...
app/services/ci/process_pipeline_service.rb
View file @
6d80b94a
...
...
@@ -44,11 +44,11 @@ module Ci
def
valid_statuses_for_when
(
value
)
case
value
when
'on_success'
%w[success]
%w[success
skipped
]
when
'on_failure'
%w[failed]
when
'always'
%w[success failed]
%w[success failed
skipped
]
else
[]
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