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
f4513d5c
Commit
f4513d5c
authored
Dec 13, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to retry build that was canceled
parent
a9ec4ec0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
spec/models/build_spec.rb
spec/models/build_spec.rb
+8
-0
No files found.
app/models/ci/build.rb
View file @
f4513d5c
...
@@ -135,7 +135,7 @@ module Ci
...
@@ -135,7 +135,7 @@ module Ci
def
retryable?
def
retryable?
project
.
builds_enabled?
&&
commands
.
present?
&&
project
.
builds_enabled?
&&
commands
.
present?
&&
(
success?
||
failed?
)
(
success?
||
failed?
||
canceled?
)
end
end
def
retried?
def
retried?
...
...
spec/models/build_spec.rb
View file @
f4513d5c
...
@@ -918,6 +918,14 @@ describe Ci::Build, models: true do
...
@@ -918,6 +918,14 @@ describe Ci::Build, models: true do
it
{
is_expected
.
to
be_retryable
}
it
{
is_expected
.
to
be_retryable
}
end
end
context
'when build is canceled'
do
before
do
build
.
cancel!
end
it
{
is_expected
.
to
be_retryable
}
end
end
end
context
'when build is not retryable'
do
context
'when build is not retryable'
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