summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-07-11 16:18:37 +0000
committerDouwe Maan <douwe@gitlab.com>2016-07-11 16:18:37 +0000
commit284ed39e3038392e5ca299a8ce58541a4abead99 (patch)
tree254dad49b60494154b1aa23b00edf7d005cb1eab /lib
parent36c60b4c269a3d60f6b3e0df3bf1bfc7d44a6b54 (diff)
parent1bfc2ed633b2086b547727acc4aa0abaaea7731f (diff)
downloadgitlab-ce-284ed39e3038392e5ca299a8ce58541a4abead99.tar.gz
Merge branch 'send-entry-via-Gitlab-Workhorse-Send-Data' into 'master'
Use Gitlab-Workhorse-Send-Data to send entry ## What does this MR do? Use Gitlab-Workhorse-Send-Data to send entry: Closes #19224, Closes #19128 Also requires this MR to work: https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/53 ## Are there points in the code the reviewer needs to double check? Do we have a test for this? ## Why was this MR needed? This way gitlab-workhorse does not have to call any API. See merge request !5094
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/workhorse.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index bc0193a6c32..6aeb49c0219 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -63,6 +63,18 @@ module Gitlab
]
end
+ def send_artifacts_entry(build, entry)
+ params = {
+ 'Archive' => build.artifacts_file.path,
+ 'Entry' => Base64.encode64(entry.path)
+ }
+
+ [
+ SEND_DATA_HEADER,
+ "artifacts-entry:#{encode(params)}"
+ ]
+ end
+
protected
def encode(hash)