summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-15 18:07:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-15 18:07:52 +0000
commit31a340adabe75f8b02cca462ab8aa857ff62f772 (patch)
tree5540138a26430ec1ad33e0b76ff44f031729d945 /lib/api
parent8bd8f7d169c6ab97cdd6b0bb74e898258a6ba1f1 (diff)
downloadgitlab-ce-31a340adabe75f8b02cca462ab8aa857ff62f772.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/api.rb3
-rw-r--r--lib/api/helpers.rb4
-rw-r--r--lib/api/job_artifacts.rb4
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index 86ddd6e57bc..b8135539cda 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -24,7 +24,8 @@ module API
Gitlab::GrapeLogging::Loggers::ExceptionLogger.new,
Gitlab::GrapeLogging::Loggers::QueueDurationLogger.new,
Gitlab::GrapeLogging::Loggers::PerfLogger.new,
- Gitlab::GrapeLogging::Loggers::CorrelationIdLogger.new
+ Gitlab::GrapeLogging::Loggers::CorrelationIdLogger.new,
+ Gitlab::GrapeLogging::Loggers::ContextLogger.new
]
allow_access_with_scope :api
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 2561be148ac..c6f6dc255d4 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -609,8 +609,8 @@ module API
header(*Gitlab::Workhorse.send_git_archive(repository, **kwargs))
end
- def send_artifacts_entry(build, entry)
- header(*Gitlab::Workhorse.send_artifacts_entry(build, entry))
+ def send_artifacts_entry(file, entry)
+ header(*Gitlab::Workhorse.send_artifacts_entry(file, entry))
end
# The Grape Error Middleware only has access to `env` but not `params` nor
diff --git a/lib/api/job_artifacts.rb b/lib/api/job_artifacts.rb
index 920938ad453..6a82256cc96 100644
--- a/lib/api/job_artifacts.rb
+++ b/lib/api/job_artifacts.rb
@@ -54,7 +54,7 @@ module API
bad_request! unless path.valid?
- send_artifacts_entry(build, path)
+ send_artifacts_entry(build.artifacts_file, path)
end
desc 'Download the artifacts archive from a job' do
@@ -90,7 +90,7 @@ module API
bad_request! unless path.valid?
- send_artifacts_entry(build, path)
+ send_artifacts_entry(build.artifacts_file, path)
end
desc 'Keep the artifacts to prevent them from being deleted' do