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
f71a9de1
Commit
f71a9de1
authored
May 19, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude manual actions from cancelable jobs scope
parent
bdf62a19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
has_status.rb
app/models/concerns/has_status.rb
+1
-1
fix-gb-exclude-manual-actions-from-cancelable-jobs.yml
...ed/fix-gb-exclude-manual-actions-from-cancelable-jobs.yml
+4
-0
pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+10
-0
No files found.
app/models/concerns/has_status.rb
View file @
f71a9de1
...
...
@@ -82,7 +82,7 @@ module HasStatus
scope
:failed_or_canceled
,
->
{
where
(
status:
[
:failed
,
:canceled
])
}
scope
:cancelable
,
->
do
where
(
status:
[
:running
,
:pending
,
:created
,
:manual
])
where
(
status:
[
:running
,
:pending
,
:created
])
end
end
...
...
changelogs/unreleased/fix-gb-exclude-manual-actions-from-cancelable-jobs.yml
0 → 100644
View file @
f71a9de1
---
title
:
Exclude manual actions when checking if pipeline can be canceled
merge_request
:
11562
author
:
spec/models/ci/pipeline_spec.rb
View file @
f71a9de1
...
...
@@ -854,6 +854,16 @@ describe Ci::Pipeline, models: true do
end
end
end
context
'when there is a manual action present in the pipeline'
do
before
do
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
)
end
it
'is not cancelable'
do
expect
(
pipeline
).
not_to
be_cancelable
end
end
end
describe
'#cancel_running'
do
...
...
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