blob: 47b356aa6e66ec25a24500ae43f087eb8360c3a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# frozen_string_literal: true
desc 'GitLab | Artifacts | Migrate files for artifacts to comply with new storage format'
namespace :gitlab do
require 'logger'
require 'resolv-replace'
namespace :artifacts do
task migrate: :environment do
logger = Logger.new($stdout)
helper = Gitlab::LocalAndRemoteStorageMigration::ArtifactMigrater.new(logger)
begin
helper.migrate_to_remote_storage
rescue StandardError => e
logger.error(e.message)
end
end
task migrate_to_local: :environment do
logger = Logger.new($stdout)
helper = Gitlab::LocalAndRemoteStorageMigration::ArtifactMigrater.new(logger)
begin
helper.migrate_to_local_storage
rescue StandardError => e
logger.error(e.message)
end
end
end
end
|