Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2017-09-21 11:34:12 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 14:04:48 +0300
commit61864a5a5bb523953589c9398a431c4369fbfc76 (patch)
tree5eac32ef8155e9066d7d1488d7856e83605aa6a5 /lib/api/runner.rb
parent25df666156279e5b392b429519b4f4ba01eefaac (diff)
Rename Artifact to JobArtifact, split metadata out
Two things at ones, as there was no clean way to seperate the commit and give me feedback from the tests. But the model Artifact is now JobArtifact, and the table does not have a type anymore, but the metadata is now its own model: Ci::JobArtifactMetadata.
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r--lib/api/runner.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb
index a3987c560dd..8de0868c063 100644
--- a/lib/api/runner.rb
+++ b/lib/api/runner.rb
@@ -215,15 +215,16 @@ module API
job = authenticate_job!
forbidden!('Job is not running!') unless job.running?
- artifacts_upload_path = ArtifactUploader.artifacts_upload_path
+ artifacts_upload_path = JobArtifactUploader.artifacts_upload_path
artifacts = uploaded_file(:file, artifacts_upload_path)
metadata = uploaded_file(:metadata, artifacts_upload_path)
bad_request!('Missing artifacts file!') unless artifacts
file_to_large! unless artifacts.size < max_artifacts_size
- job.artifacts_file = artifacts
- job.artifacts_metadata = metadata
+ job.job_artifacts.build(project: job.project, file_type: :archive, file: artifacts)
+ job.job_artifacts.build(project: job.project, file_type: :metadata, file: metadata)
+
job.artifacts_expire_in = params['expire_in'] ||
Gitlab::CurrentSettings.current_application_settings.default_artifacts_expire_in