Module: Gitlab::Cleanup::OrphanJobArtifactFinalObjects::StorageHelpers
- Includes:
- Utils::StrongMemoize
- Included in:
- BatchFromList, GenerateList, RollbackDeletedObjects
- Defined in:
- lib/gitlab/cleanup/orphan_job_artifact_final_objects/storage_helpers.rb
Instance Method Summary collapse
- #artifacts_directory ⇒ Object
- #bucket ⇒ Object
- #bucket_prefix ⇒ Object
- #configuration ⇒ Object
- #connection ⇒ Object
Instance Method Details
#artifacts_directory ⇒ Object
25 26 27 |
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/storage_helpers.rb', line 25 def artifacts_directory connection.directories.new(key: bucket) end |
#bucket ⇒ Object
17 18 19 |
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/storage_helpers.rb', line 17 def bucket configuration.remote_directory end |
#bucket_prefix ⇒ Object
21 22 23 |
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/storage_helpers.rb', line 21 def bucket_prefix configuration.bucket_prefix end |
#configuration ⇒ Object
13 14 15 |
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/storage_helpers.rb', line 13 def configuration Gitlab.config.artifacts.object_store end |
#connection ⇒ Object
9 10 11 |
# File 'lib/gitlab/cleanup/orphan_job_artifact_final_objects/storage_helpers.rb', line 9 def connection ::Fog::Storage.new(configuration['connection'].symbolize_keys) end |