Skip to content
Snippets Groups Projects
Commit dd8afbf0 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files
parent 6953d988
No related branches found
No related tags found
No related merge requests found
Loading
@@ -37,8 +37,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
Loading
@@ -37,8 +37,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
end end
   
def latest_succeeded def latest_succeeded
path = ref_name_and_path.last target_path = artifacts_action_path(@path, project, build)
target_path = artifacts_action_path(path, project, build)
   
if target_path if target_path
redirect_to(target_path) redirect_to(target_path)
Loading
@@ -63,17 +62,13 @@ class Projects::ArtifactsController < Projects::ApplicationController
Loading
@@ -63,17 +62,13 @@ class Projects::ArtifactsController < Projects::ApplicationController
   
def build_from_ref def build_from_ref
if params[:ref_name_and_path] if params[:ref_name_and_path]
ref_name = ref_name_and_path.first ref_name, @path = extract_ref(params[:ref_name_and_path])
builds = project.latest_successful_builds_for(ref_name) builds = project.latest_successful_builds_for(ref_name)
   
builds.find_by(name: params[:job]) builds.find_by(name: params[:job])
end end
end end
   
def ref_name_and_path
@ref_name_and_path ||= extract_ref(params[:ref_name_and_path])
end
def artifacts_file def artifacts_file
@artifacts_file ||= build.artifacts_file @artifacts_file ||= build.artifacts_file
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment