summaryrefslogtreecommitdiff
path: root/lib/api/jobs.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-09-05 12:27:40 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-09-05 12:34:49 +0200
commit3b874414c06156767117b7aa7ae705c7342d887c (patch)
tree04318abb3fe8f963a51b8b1360dd664e57359da5 /lib/api/jobs.rb
parent52e52f4a172ae5aa54eac4a22d98610ec5aea1b0 (diff)
downloadgitlab-ce-3b874414c06156767117b7aa7ae705c7342d887c.tar.gz
Do not use artifacts metadata to access single artifact
Diffstat (limited to 'lib/api/jobs.rb')
-rw-r--r--lib/api/jobs.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index 41c70a2dcb7..3d71d6bb062 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -98,10 +98,11 @@ module API
build = get_build!(params[:job_id])
not_found! unless build.artifacts?
- entry = build.artifacts_metadata_entry(params[:artifact_path])
- not_found! unless entry.exists?
+ path = Gitlab::Ci::Build::Artifacts::Path
+ .new(params[:artifact_path])
+ not_found! unless path.valid?
- send_artifacts_entry(build, entry)
+ send_artifacts_entry(build, path)
end
desc 'Download the artifacts file from a job' do