Improve code design
This commit is contained in:
parent
f08eb7bbb7
commit
f12faae8b8
|
@ -49,18 +49,14 @@ class Projects::BuildsController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def retry
|
||||
unless @build.retryable?
|
||||
return render_404
|
||||
end
|
||||
return render_404 unless @build.retryable?
|
||||
|
||||
build = Ci::Build.retry(@build, current_user)
|
||||
redirect_to build_path(build)
|
||||
end
|
||||
|
||||
def play
|
||||
unless @build.playable?
|
||||
return render_404
|
||||
end
|
||||
return render_404 unless @build.playable?
|
||||
|
||||
build = @build.play(current_user)
|
||||
redirect_to build_path(build)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Gitlab::Seeder::Builds
|
||||
STAGES = %w(build notify_build test notify_test deploy notify_deploy)
|
||||
STAGES = %w[build notify_build test notify_test deploy notify_deploy]
|
||||
|
||||
def initialize(project)
|
||||
@project = project
|
||||
|
|
|
@ -530,7 +530,7 @@ The above script will:
|
|||
|
||||
1. Execute `cleanup_build_job` only when `build_job` fails
|
||||
2. Always execute `cleanup_job` as the last step in pipeline
|
||||
3. Allow you to manually execute `deploy_job` form GitLab
|
||||
3. Allow you to manually execute `deploy_job` from GitLab
|
||||
|
||||
#### Manual actions
|
||||
|
||||
|
|
Loading…
Reference in New Issue