debian-mirror-gitlab/lib/tasks/gitlab/pages.rake
2022-07-29 14:03:07 +02:00

33 lines
811 B
Ruby

# frozen_string_literal: true
require 'logger'
namespace :gitlab do
namespace :pages do
namespace :deployments do
task migrate_to_object_storage: :gitlab_environment do
logger = Logger.new($stdout)
helper = Gitlab::LocalAndRemoteStorageMigration::PagesDeploymentMigrater.new(logger)
begin
helper.migrate_to_remote_storage
rescue StandardError => e
logger.error(e.message)
end
end
task migrate_to_local: :gitlab_environment do
logger = Logger.new($stdout)
helper = Gitlab::LocalAndRemoteStorageMigration::PagesDeploymentMigrater.new(logger)
begin
helper.migrate_to_local_storage
rescue StandardError => e
logger.error(e.message)
end
end
end
end
end