diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-25 06:09:56 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-25 06:09:56 +0000 |
commit | a3c806732570bd38feb3204b1eadd1f70b21e266 (patch) | |
tree | a3d2b0cfefc06435dcc9715aa69a387a18db8a4e | |
parent | 0009016b6803c01ffaa92eee87e5a3d475af95dd (diff) | |
parent | ddf873ad5e4d5e856ac59c580a7352cc2d47ad76 (diff) | |
download | gitlab-ce-a3c806732570bd38feb3204b1eadd1f70b21e266.tar.gz |
Merge branch 'gitlab-shell-check' of /home/git/repositories/gitlab/gitlabhq
-rw-r--r-- | lib/tasks/gitlab/check.rake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 1e9228a3509..72a6743ee72 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -376,6 +376,7 @@ namespace :gitlab do check_repo_base_permissions check_update_hook_is_up_to_date check_repos_update_hooks_is_link + check_gitlab_shell_self_test finished_checking "GitLab Shell" end @@ -552,6 +553,23 @@ namespace :gitlab do 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 + # Helper methods ######################## |