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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
has_status.rb
app/models/concerns/has_status.rb
+3
-3
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