Commit f12faae8 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Improve code design

parent f08eb7bb
...@@ -49,18 +49,14 @@ class Projects::BuildsController < Projects::ApplicationController ...@@ -49,18 +49,14 @@ class Projects::BuildsController < Projects::ApplicationController
end end
def retry def retry
unless @build.retryable? return render_404 unless @build.retryable?
return render_404
end
build = Ci::Build.retry(@build, current_user) build = Ci::Build.retry(@build, current_user)
redirect_to build_path(build) redirect_to build_path(build)
end end
def play def play
unless @build.playable? return render_404 unless @build.playable?
return render_404
end
build = @build.play(current_user) build = @build.play(current_user)
redirect_to build_path(build) redirect_to build_path(build)
......
class Gitlab::Seeder::Builds 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) def initialize(project)
@project = project @project = project
......
...@@ -530,7 +530,7 @@ The above script will: ...@@ -530,7 +530,7 @@ The above script will:
1. Execute `cleanup_build_job` only when `build_job` fails 1. Execute `cleanup_build_job` only when `build_job` fails
2. Always execute `cleanup_job` as the last step in pipeline 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 #### 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