summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-11-13 08:59:57 +0000
committerDouwe Maan <douwe@gitlab.com>2018-11-13 08:59:57 +0000
commitd159a68024fc6fed03ce0e66e7d8c76a2cf6df6e (patch)
treeede27c2c81e15227e732e5a71337c43cc06dabd5
parent94ab99a8cfce419cf642be33ffca9c9ae8cb360e (diff)
parent358fefc7776afd89545aad62eefd5afdd2dce20a (diff)
downloadgitlab-ce-d159a68024fc6fed03ce0e66e7d8c76a2cf6df6e.tar.gz
Merge branch 'zj-remove-broken-storage' into 'master'
Remove obsolete gitlab_shell checks See merge request gitlab-org/gitlab-ce!22417
-rw-r--r--changelogs/unreleased/zj-remove-broken-storage.yml5
-rw-r--r--lib/tasks/gitlab/check.rake37
2 files changed, 5 insertions, 37 deletions
diff --git a/changelogs/unreleased/zj-remove-broken-storage.yml b/changelogs/unreleased/zj-remove-broken-storage.yml
new file mode 100644
index 00000000000..9df87b40e09
--- /dev/null
+++ b/changelogs/unreleased/zj-remove-broken-storage.yml
@@ -0,0 +1,5 @@
+---
+title: Remove obsolete gitlab_shell rake tasks
+merge_request: 22417
+author:
+type: removed
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 663bebfe71a..a2c3e32948f 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -45,7 +45,6 @@ namespace :gitlab do
start_checking "GitLab Shell"
check_gitlab_shell
- check_repos_hooks_directory_is_link
check_gitlab_shell_self_test
finished_checking "GitLab Shell"
@@ -54,42 +53,6 @@ namespace :gitlab do
# Checks
########################
- def check_repos_hooks_directory_is_link
- print "hooks directories in repos are links: ... "
-
- gitlab_shell_hooks_path = Gitlab.config.gitlab_shell.hooks_path
-
- unless Project.count > 0
- puts "can't check, you have no projects".color(:magenta)
- return
- end
-
- puts ""
-
- Project.find_each(batch_size: 100) do |project|
- print sanitized_message(project)
- project_hook_directory = File.join(project.repository.path_to_repo, "hooks")
-
- if project.empty_repo?
- puts "repository is empty".color(:magenta)
- elsif File.directory?(project_hook_directory) && File.directory?(gitlab_shell_hooks_path) &&
- (File.realpath(project_hook_directory) == File.realpath(gitlab_shell_hooks_path))
- puts 'ok'.color(:green)
- else
- puts "wrong or missing hooks".color(:red)
- try_fixing_it(
- sudo_gitlab("#{File.join(gitlab_shell_path, 'bin/create-hooks')} #{repository_storage_paths_args.join(' ')}"),
- 'Check the hooks_path in config/gitlab.yml',
- 'Check your gitlab-shell installation'
- )
- for_more_information(
- see_installation_guide_section "GitLab Shell"
- )
- fix_and_rerun
- end
- end
- end
-
def check_gitlab_shell_self_test
gitlab_shell_repo_base = gitlab_shell_path
check_cmd = File.expand_path('bin/check', gitlab_shell_repo_base)