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:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-23 20:51:20 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 14:04:49 +0300
commit38c61ab6df15fbd1eab22a8dff8da01b17c075f3 (patch)
treec0df50ea346d5ab5f9b21951b9fc746869a44612 /app/uploaders/job_artifact_uploader.rb
parent871de0f18581bb03fed5c0d800f8183598a0195f (diff)
Fix specs failures, and use factory with `:ci_job_artifact, :archive`
Diffstat (limited to 'app/uploaders/job_artifact_uploader.rb')
-rw-r--r--app/uploaders/job_artifact_uploader.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/app/uploaders/job_artifact_uploader.rb b/app/uploaders/job_artifact_uploader.rb
index d54411e198f..15dfb5a5763 100644
--- a/app/uploaders/job_artifact_uploader.rb
+++ b/app/uploaders/job_artifact_uploader.rb
@@ -1,12 +1,12 @@
class JobArtifactUploader < GitlabUploader
storage :file
- def self.local_artifacts_store
+ def self.local_store_path
Gitlab.config.artifacts.path
end
def self.artifacts_upload_path
- File.join(self.local_artifacts_store, 'tmp/uploads/')
+ File.join(self.local_store_path, 'tmp/uploads/')
end
def size
@@ -15,8 +15,24 @@ class JobArtifactUploader < GitlabUploader
model.size
end
+ def store_dir
+ default_local_path
+ end
+
+ def cache_dir
+ File.join(self.class.local_store_path, 'tmp/cache')
+ end
+
+ def work_dir
+ File.join(self.class.local_store_path, 'tmp/work')
+ end
+
private
+ def default_local_path
+ File.join(self.class.local_store_path, default_path)
+ end
+
def default_path
creation_date = model.created_at.utc.strftime('%Y_%m_%d')