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
4117c815
Commit
4117c815
authored
Mar 17, 2016
by
Geoffrey Lalonde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted behavior so canceled builds tagged as allowed to fail do not fail build
parent
39fb836c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
commit_status.rb
app/models/commit_status.rb
+1
-1
status_spec.rb
spec/lib/ci/status_spec.rb
+23
-0
No files found.
app/models/commit_status.rb
View file @
4117c815
...
...
@@ -114,7 +114,7 @@ class CommitStatus < ActiveRecord::Base
end
def
ignored?
failed?
&&
allow_failure?
allow_failure?
&&
(
failed?
||
canceled?
)
end
def
duration
...
...
spec/lib/ci/status_spec.rb
View file @
4117c815
...
...
@@ -48,6 +48,29 @@ describe Ci::Status do
it
{
is_expected
.
to
eq
'success'
}
end
context
'success and canceled'
do
let
(
:statuses
)
do
[
create
(
type
,
status: :success
),
create
(
type
,
status: :canceled
)]
end
it
{
is_expected
.
to
eq
'failed'
}
end
context
'all canceled'
do
let
(
:statuses
)
do
[
create
(
type
,
status: :canceled
),
create
(
type
,
status: :canceled
)]
end
it
{
is_expected
.
to
eq
'canceled'
}
end
context
'success and canceled but allowed to fail'
do
let
(
:statuses
)
do
[
create
(
type
,
status: :success
),
create
(
type
,
status: :canceled
,
allow_failure:
true
)]
end
it
{
is_expected
.
to
eq
'success'
}
end
context
'one finished and second running but allowed to fail'
do
let
(
:statuses
)
do
[
create
(
type
,
status: :success
),
...
...
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