Skip to content
Snippets Groups Projects

Add registry-database import command to gitlab-ctl

Merged João Pereira requested to merge registry-import-command into master
@@ -8,7 +8,7 @@ module RegistryDatabase
EXEC_PATH = '/opt/gitlab/embedded/bin/registry'.freeze
CONFIG_PATH = '/var/opt/gitlab/registry/config.yml'.freeze
USAGE ||= <<~EOS.freeze
USAGE = <<~EOS.freeze
Usage:
gitlab-ctl registry-database command subcommand [options]
@@ -68,7 +68,7 @@ module RegistryDatabase
end
end,
'import' => OptionParser.new do |opts|
'import' => OptionParser.new do |opts|
opts.banner = "Usage: gitlab-ctl registry-database import [options]. See documentation at #{import_docs_url}"
begin
Import.parse_options!(ARGV, options, opts)
@@ -98,7 +98,7 @@ module RegistryDatabase
command = set_command(options)
puts "Executing command:\n#{command.join(" ")}\n"
puts "Executing command:\n#{command.join(' ')}\n"
begin
status = Kernel.system(*command)
@@ -168,7 +168,7 @@ module RegistryDatabase
def self.continue?(needs_stop)
return unless needs_stop && running?
puts 'WARNING: Migrations cannot be applied while the container registry is running. '\
puts 'WARNING: Migrations cannot be applied while the container registry is running. ' \
'Stop the registry before proceeding? (y/n)'.color(:yellow)
if $stdin.gets.chomp.casecmp('y').zero?
Loading