end
end
+ def check_gitlab_shell_self_test
+ gitlab_shell_repo_base = File.expand_path('gitlab-shell', gitlab_shell_user_home)
+ check_cmd = File.expand_path('bin/check', gitlab_shell_repo_base)
+ puts "Running #{check_cmd}"
+ if system(check_cmd, chdir: gitlab_shell_repo_base)
+ puts 'gitlab-shell self-check successful'.green
+ else
+ puts 'gitlab-shell self-check failed'.red
+ try_fixing_it(
+ 'Make sure GitLab is running;',
+ 'Check the gitlab-shell configuration file:',
+ sudo_gitlab("editor #{File.expand_path('config.yml', gitlab_shell_repo_base)}")
+ )
+ fix_and_rerun
+ end
+ end
+
+ def check_projects_have_namespace
+ print "projects have namespace: ... "
+
+ unless Project.count > 0
+ puts "can't check, you have no projects".magenta
+ return
+ end
+ puts ""
+
+ Project.find_each(batch_size: 100) do |project|
+ print "#{project.name_with_namespace.yellow} ... "
+
+ if project.namespace
+ puts "yes".green
+ else
+ puts "no".red
+ try_fixing_it(
+ "Migrate global projects"
+ )
+ for_more_information(
+ "doc/update/5.4-to-6.0.md in section \"#global-projects\""
+ )
+ fix_and_rerun
+ end
+ end
+ end
# Helper methods
########################