diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-05 16:40:14 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-05 16:40:14 +0300 |
commit | 957e849f41d96fa9778fcdd06792d2f0274b29ab (patch) | |
tree | eb100ece04228262142e6ebfeb1df9b1efb824b2 /lib/tasks | |
parent | 6b9dbe9f5a175a8162abf296367f561bab3eea1a (diff) | |
parent | 1cb8588c662df41a76788759737e5b9ecb2ceba6 (diff) |
Merge branch 'drop-satellites'
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/check.rake | 56 | ||||
-rw-r--r-- | lib/tasks/gitlab/enable_automerge.rake | 39 |
2 files changed, 0 insertions, 95 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index badb47c6779..8acb6a7fd19 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -25,7 +25,6 @@ namespace :gitlab do check_init_script_exists check_init_script_up_to_date check_projects_have_namespace - check_satellites_exist check_redis_version check_ruby_version check_git_version @@ -238,37 +237,6 @@ namespace :gitlab do end end - def check_satellites_exist - print "Projects have satellites? ... " - - 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 sanitized_message(project) - - if project.satellite.exists? - puts "yes".green - elsif project.empty_repo? - puts "can't create, repository is empty".magenta - else - puts "no".red - try_fixing_it( - sudo_gitlab("bundle exec rake gitlab:satellites:create RAILS_ENV=production"), - "If necessary, remove the tmp/repo_satellites directory ...", - "... and rerun the above command" - ) - for_more_information( - "doc/raketasks/maintenance.md " - ) - fix_and_rerun - end - end - end - def check_log_writable print "Log directory writable? ... " @@ -339,7 +307,6 @@ namespace :gitlab do check_repo_base_is_not_symlink check_repo_base_user_and_group check_repo_base_permissions - check_satellites_permissions check_repos_hooks_directory_is_link check_gitlab_shell_self_test @@ -417,29 +384,6 @@ namespace :gitlab do end end - def check_satellites_permissions - print "Satellites access is drwxr-x---? ... " - - satellites_path = Gitlab.config.satellites.path - unless File.exists?(satellites_path) - puts "can't check because of previous errors".magenta - return - end - - if File.stat(satellites_path).mode.to_s(8).ends_with?("0750") - puts "yes".green - else - puts "no".red - try_fixing_it( - "sudo chmod u+rwx,g=rx,o-rwx #{satellites_path}", - ) - for_more_information( - see_installation_guide_section "GitLab" - ) - fix_and_rerun - end - end - def check_repo_base_user_and_group gitlab_shell_ssh_user = Gitlab.config.gitlab_shell.ssh_user gitlab_shell_owner_group = Gitlab.config.gitlab_shell.owner_group diff --git a/lib/tasks/gitlab/enable_automerge.rake b/lib/tasks/gitlab/enable_automerge.rake deleted file mode 100644 index 3dade9d75b8..00000000000 --- a/lib/tasks/gitlab/enable_automerge.rake +++ /dev/null @@ -1,39 +0,0 @@ -namespace :gitlab do - namespace :satellites do - desc "GitLab | Create satellite repos" - task create: :environment do - create_satellites - end - end - - def create_satellites - warn_user_is_not_gitlab - - print "Creating satellites for ..." - unless Project.count > 0 - puts "skipping, because you have no projects".magenta - return - end - puts "" - - Project.find_each(batch_size: 100) do |project| - print "#{project.name_with_namespace.yellow} ... " - - unless project.repo_exists? - puts "skipping, because the repo is empty".magenta - next - end - - if project.satellite.exists? - puts "exists already".green - else - print "\n... " - if project.satellite.create - puts "created".green - else - puts "error".red - end - end - end - end -end |