summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-04-03 20:42:51 +0900
committerShinya Maeda <shinya@gitlab.com>2018-04-03 20:42:51 +0900
commit61c8093b264422f900ec2aa29e313a617fc663a4 (patch)
tree461502a35170b2ec97f8c1581e7fc3ff9d41d406 /lib
parent4a9d9f15eff0b57c2648679d93dece192c90c904 (diff)
downloadgitlab-ce-61c8093b264422f900ec2aa29e313a617fc663a4.tar.gz
Store metadata checksum for artifacts43745-store-metadata-checksum-for-artifacts
Diffstat (limited to 'lib')
-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 57c0a729535..834253d8e94 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -208,6 +208,7 @@ module API
optional 'file.sha256', type: String, desc: %q(sha256 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))
+ optional 'metadata.sha256', type: String, desc: %q(sha256 checksum of the file)
end
post '/:id/artifacts' do
not_allowed! unless Gitlab.config.artifacts.enabled
@@ -227,7 +228,7 @@ module API
Gitlab::CurrentSettings.current_application_settings.default_artifacts_expire_in
job.build_job_artifacts_archive(project: job.project, file_type: :archive, file: artifacts, file_sha256: 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.build_job_artifacts_metadata(project: job.project, file_type: :metadata, file: metadata, file_sha256: params['metadata.sha256'], expire_in: expire_in) if metadata
job.artifacts_expire_in = expire_in
if job.save