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
640924e4
Commit
640924e4
authored
Jul 18, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark builds with manual actions as skipped
parent
5b119a9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
app/models/concerns/statuseable.rb
app/models/concerns/statuseable.rb
+3
-3
app/services/ci/create_builds_service.rb
app/services/ci/create_builds_service.rb
+3
-1
No files found.
app/models/concerns/statuseable.rb
View file @
640924e4
...
...
@@ -16,10 +16,10 @@ module Statuseable
deduce_status
=
"(CASE
WHEN (
#{
builds
}
)=0 THEN NULL
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
ignored
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
pending
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
canceled
}
)+(
#{
success
}
)+(
#{
ignored
}
) THEN 'canceled'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 'skipped'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
ignored
}
)+(
#{
skipped
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
pending
}
)+(
#{
skipped
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
canceled
}
)+(
#{
success
}
)+(
#{
ignored
}
)+(
#{
skipped
}
) THEN 'canceled'
WHEN (
#{
running
}
)+(
#{
pending
}
)>0 THEN 'running'
ELSE 'failed'
END)"
...
...
app/services/ci/create_builds_service.rb
View file @
640924e4
...
...
@@ -15,7 +15,7 @@ module Ci
status
==
'success'
when
'on_failure'
status
==
'failed'
when
'always'
when
'always'
,
'manual'
%w(success failed)
.
include?
(
status
)
end
end
...
...
@@ -47,6 +47,8 @@ module Ci
user:
user
,
project:
@pipeline
.
project
)
build_attrs
[
:status
]
=
'skipped'
if
build_attrs
[
:when
]
==
'manual'
##
# We do not persist new builds here.
# Those will be persisted when @pipeline is saved.
...
...
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