Commit 71266ad28f2ec4e9c771659f781885164d9b0412

Authored by Riyad Preukschas
1 parent 0236b3d1

Split and renamed check tasks

Showing 1 changed file with 26 additions and 5 deletions   Show diff stats
lib/tasks/gitlab/check.rake
1 namespace :gitlab do 1 namespace :gitlab do
  2 + desc "GITLAB | Check the configuration of GitLab and its environment"
  3 + task check: %w{gitlab:env:check
  4 + gitlab:app:check
  5 + gitlab:gitolite:check
  6 + gitlab:resque:check}
  7 +
2 namespace :app do 8 namespace :app do
3 - desc "GITLAB | Check GitLab installation status"  
4 - task :status => :environment do  
5 - puts "\nStarting diagnostics".yellow  
6 - git_base_path = Gitlab.config.git_base_path 9 + desc "GITLAB | Check the configuration of the GitLab Rails app"
  10 + task check: :environment do
7 11
8 print "config/database.yml............" 12 print "config/database.yml............"
9 if File.exists?(Rails.root.join "config", "database.yml") 13 if File.exists?(Rails.root.join "config", "database.yml")
@@ -20,6 +24,19 @@ namespace :gitlab do @@ -20,6 +24,19 @@ namespace :gitlab do
20 puts "missing".red 24 puts "missing".red
21 return 25 return
22 end 26 end
  27 + end
  28 + end
  29 +
  30 + namespace :env do
  31 + desc "GITLAB | Check the configuration of the environment"
  32 + task check: :environment do
  33 + end
  34 + end
  35 +
  36 + namespace :gitolite do
  37 + desc "GITLAB | Check the configuration of Gitolite"
  38 + task check: :environment do
  39 + git_base_path = Gitlab.config.git_base_path
23 40
24 print "#{git_base_path}............" 41 print "#{git_base_path}............"
25 if File.exists?(git_base_path) 42 if File.exists?(git_base_path)
@@ -106,8 +123,12 @@ namespace :gitlab do @@ -106,8 +123,12 @@ namespace :gitlab do
106 end 123 end
107 end 124 end
108 end 125 end
  126 + end
  127 + end
109 128
110 - puts "\nFinished".blue 129 + namespace :resque do
  130 + desc "GITLAB | Check the configuration of Resque"
  131 + task check: :environment do
111 end 132 end
112 end 133 end
113 end 134 end