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
108d3765
Commit
108d3765
authored
Feb 14, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify implementation of build retry service
parent
d4522de2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
app/services/ci/retry_build_service.rb
app/services/ci/retry_build_service.rb
+2
-8
No files found.
app/services/ci/retry_build_service.rb
View file @
108d3765
module
Ci
class
RetryBuildService
<
::
BaseService
def
execute
(
build
)
# return unless build.retryable?
reprocess
(
build
).
tap
do
|
new_build
|
new_build
.
enqueue!
self
.
retry
(
build
).
tap
do
|
new_build
|
MergeRequests
::
AddTodoWhenBuildFailsService
.
new
(
build
.
project
,
current_user
)
.
close
(
new_build
)
...
...
@@ -13,12 +13,6 @@ module Ci
end
end
def
retry
(
build
)
self
.
reprocess
(
build
).
tap
do
|
new_build
|
new_build
.
enqueue!
end
end
def
reprocess
(
build
)
unless
can?
(
current_user
,
:update_build
,
build
)
raise
Gitlab
::
Access
::
AccessDeniedError
...
...
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