summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-03-01 22:10:44 +0900
committerShinya Maeda <shinya@gitlab.com>2018-03-06 17:02:47 +0900
commita1c612ce2dc2b42137664f73c3a70f3a283bcc0a (patch)
treefd3d5671cc7b9746ca0892389206d425e3e6d7c1
parentf00cec607f6ffc99c6170e66c6ecfa99c9e15b75 (diff)
downloadgitlab-ce-a1c612ce2dc2b42137664f73c3a70f3a283bcc0a.tar.gz
Add checksum at runner grape api
-rw-r--r--lib/api/runner.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb
index 91cdc564002..8d2bcc73bb3 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -204,6 +204,7 @@ module API
optional 'file.path', type: String, desc: %q(path to locally stored body (generated by Workhorse))
optional 'file.name', type: String, desc: %q(real filename as send in Content-Disposition (generated by Workhorse))
optional 'file.type', type: String, desc: %q(real content type as send in Content-Type (generated by Workhorse))
+ optional 'file.sha256', type: String, desc: %q(checksum of the file)
optional 'metadata.path', type: String, desc: %q(path to locally stored body (generated by Workhorse))
optional 'metadata.name', type: String, desc: %q(filename (generated by Workhorse))
end
@@ -224,7 +225,7 @@ module API
expire_in = params['expire_in'] ||
Gitlab::CurrentSettings.current_application_settings.default_artifacts_expire_in
- job.build_job_artifacts_archive(project: job.project, file_type: :archive, file: artifacts, expire_in: expire_in)
+ job.build_job_artifacts_archive(project: job.project, file_type: :archive, file: artifacts, checksum: params['file.sha256'], expire_in: expire_in)
job.build_job_artifacts_metadata(project: job.project, file_type: :metadata, file: metadata, expire_in: expire_in) if metadata
job.artifacts_expire_in = expire_in