debian-mirror-gitlab/lib/tasks/gitlab/pages.rake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
819 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2021-03-08 18:12:59 +05:30
namespace :gitlab do
namespace :pages do
2021-04-29 21:17:54 +05:30
namespace :deployments do
task migrate_to_object_storage: :gitlab_environment do
2023-05-27 22:25:52 +05:30
require 'logger'
2021-09-04 01:27:46 +05:30
logger = Logger.new($stdout)
2021-04-29 21:17:54 +05:30
2021-06-08 01:23:25 +05:30
helper = Gitlab::LocalAndRemoteStorageMigration::PagesDeploymentMigrater.new(logger)
2021-04-29 21:17:54 +05:30
begin
helper.migrate_to_remote_storage
2021-06-08 01:23:25 +05:30
rescue StandardError => e
2021-04-29 21:17:54 +05:30
logger.error(e.message)
end
end
task migrate_to_local: :gitlab_environment do
2021-09-04 01:27:46 +05:30
logger = Logger.new($stdout)
2021-04-29 21:17:54 +05:30
2021-06-08 01:23:25 +05:30
helper = Gitlab::LocalAndRemoteStorageMigration::PagesDeploymentMigrater.new(logger)
2021-04-29 21:17:54 +05:30
begin
helper.migrate_to_local_storage
2021-06-08 01:23:25 +05:30
rescue StandardError => e
2021-04-29 21:17:54 +05:30
logger.error(e.message)
end
end
end
2021-03-08 18:12:59 +05:30
end
end