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
fd4fd0cb
Commit
fd4fd0cb
authored
Aug 15, 2019
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failures
parent
1a13188d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
app/models/concerns/has_status.rb
app/models/concerns/has_status.rb
+2
-1
lib/gitlab/ci/status/composite_status.rb
lib/gitlab/ci/status/composite_status.rb
+5
-5
No files found.
app/models/concerns/has_status.rb
View file @
fd4fd0cb
...
...
@@ -10,7 +10,8 @@ module HasStatus
ACTIVE_STATUSES
=
%w[preparing pending running]
.
freeze
COMPLETED_STATUSES
=
%w[success failed canceled skipped]
.
freeze
ORDERED_STATUSES
=
%w[failed preparing pending running manual scheduled canceled success skipped created]
.
freeze
WARNING_STATUSES
=
%w[manual failed canceled]
.
to_set
.
freeze
WARNING_IF_ALLOW_FAILURE_STATUSES
=
%w[manual failed canceled]
.
to_set
.
freeze
IGNORED_IF_ALLOW_FAILURE_STATUSES
=
%w[failed canceled]
.
to_set
.
freeze
STATUSES_ENUM
=
{
created:
0
,
pending:
1
,
running:
2
,
success:
3
,
failed:
4
,
canceled:
5
,
skipped:
6
,
manual:
7
,
scheduled:
8
,
preparing:
9
}.
freeze
...
...
lib/gitlab/ci/status/composite_status.rb
View file @
fd4fd0cb
...
...
@@ -15,9 +15,7 @@ module Gitlab
def
status
case
when
none?
:skipped
when
only_of?
(
:skipped
)
when
none?
||
only_of?
(
:skipped
)
warnings?
?
:success
:
:skipped
when
only_of?
(
:success
,
:skipped
)
:success
...
...
@@ -65,9 +63,11 @@ module Gitlab
def
build_status_set
(
all_statuses
)
all_statuses
.
each
do
|
status
|
if
status
[
:allow_failure
]
&&
HasStatus
::
WARNING_STATUSES
.
include?
(
status
[
:status
])
if
status
[
:allow_failure
]
&&
HasStatus
::
WARNING_
IF_ALLOW_FAILURE_
STATUSES
.
include?
(
status
[
:status
])
@warnings
+=
1
else
end
if
!
status
[
:allow_failure
]
||
!
HasStatus
::
IGNORED_IF_ALLOW_FAILURE_STATUSES
.
include?
(
status
[
:status
])
@status_set
.
add
(
status
[
:status
].
to_sym
)
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