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