Skip to content
Snippets Groups Projects
Commit f2969b1b authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files
parent 0882355d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -70,7 +70,7 @@ module API
 
build = get_build!(params[:build_id])
 
present_artifact!(build.artifacts_file)
present_artifacts!(build.artifacts_file)
end
 
# Download the artifacts file from ref_name and job
Loading
Loading
@@ -86,7 +86,7 @@ module API
builds = user_project.latest_successful_builds_for(params[:ref_name])
latest_build = builds.find_by!(name: params[:job])
 
present_artifact!(latest_build.artifacts_file)
present_artifacts!(latest_build.artifacts_file)
end
 
# Get a trace of a specific build of a project
Loading
Loading
@@ -198,7 +198,7 @@ module API
get_build(id) || not_found!
end
 
def present_artifact!(artifacts_file)
def present_artifacts!(artifacts_file)
if !artifacts_file.file_storage?
redirect_to(build.artifacts_file.url)
elsif artifacts_file.exists?
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