2018-02-02 08:59:43 -05:00
|
|
|
class LegacyArtifactUploader < GitlabUploader
|
|
|
|
extend Workhorse::UploadPath
|
|
|
|
include ObjectStorage::Concern
|
2017-11-23 10:57:27 -05:00
|
|
|
|
2018-02-02 08:59:43 -05:00
|
|
|
storage_options Gitlab.config.artifacts
|
2017-11-23 10:57:27 -05:00
|
|
|
|
2018-02-02 08:59:43 -05:00
|
|
|
def store_dir
|
|
|
|
dynamic_segment
|
2017-11-23 10:57:27 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2018-02-02 08:59:43 -05:00
|
|
|
def dynamic_segment
|
2017-11-23 10:57:27 -05:00
|
|
|
File.join(model.created_at.utc.strftime('%Y_%m'), model.project_id.to_s, model.id.to_s)
|
|
|
|
end
|
|
|
|
end
|