diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /lib/gitlab/workhorse.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r-- | lib/gitlab/workhorse.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index b375602a5fe..c91d1b05440 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -62,9 +62,6 @@ module Gitlab end def send_git_archive(repository, ref:, format:, append_sha:, path: nil) - path_enabled = Feature.enabled?(:git_archive_path, default_enabled: true) - path = nil unless path_enabled - format ||= 'tar.gz' format = format.downcase @@ -78,12 +75,7 @@ module Gitlab raise "Repository or ref not found" if metadata.empty? - params = - if path_enabled - send_git_archive_params(repository, metadata, path, archive_format(format)) - else - metadata - end + params = send_git_archive_params(repository, metadata, path, archive_format(format)) # If present, DisableCache must be a Boolean. Otherwise # workhorse ignores it. @@ -138,8 +130,7 @@ module Gitlab ] end - def send_artifacts_entry(build, entry) - file = build.artifacts_file + def send_artifacts_entry(file, entry) archive = file.file_storage? ? file.path : file.url params = { @@ -213,7 +204,7 @@ module Gitlab # This is the outermost encoding of a senddata: header. It is safe for # inclusion in HTTP response headers def encode(hash) - Base64.urlsafe_encode64(JSON.dump(hash)) + Base64.urlsafe_encode64(Gitlab::Json.dump(hash)) end # This is for encoding individual fields inside the senddata JSON that |