Commit f12faae8 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Improve code design

parent f08eb7bb
......@@ -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)
......
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment