diff options
| -rw-r--r-- | changelogs/unreleased/zj-remove-git-rake-tasks.yml | 2 | ||||
| -rw-r--r-- | doc/administration/img/raketasks/check_repos_output.png | bin | 19153 -> 0 bytes | |||
| -rw-r--r-- | doc/administration/raketasks/check.md | 31 | ||||
| -rw-r--r-- | lib/tasks/gitlab/check.rake | 17 |
4 files changed, 3 insertions, 47 deletions
diff --git a/changelogs/unreleased/zj-remove-git-rake-tasks.yml b/changelogs/unreleased/zj-remove-git-rake-tasks.yml index 28e8886fd60..8c90fc7d0fe 100644 --- a/changelogs/unreleased/zj-remove-git-rake-tasks.yml +++ b/changelogs/unreleased/zj-remove-git-rake-tasks.yml @@ -1,5 +1,5 @@ --- -title: Remove git maintainance housekeeping tasks +title: Remove gitlab:user:check_repos, gitlab:check_repo, gitlab:git:prune, gitlab:git:gc, and gitlab:git:repack merge_request: 20806 author: type: removed diff --git a/doc/administration/img/raketasks/check_repos_output.png b/doc/administration/img/raketasks/check_repos_output.png Binary files differdeleted file mode 100644 index 7fda2ba0c0f..00000000000 --- a/doc/administration/img/raketasks/check_repos_output.png +++ /dev/null diff --git a/doc/administration/raketasks/check.md b/doc/administration/raketasks/check.md index a8b4a5cbce3..0ca1d77f1d0 100644 --- a/doc/administration/raketasks/check.md +++ b/doc/administration/raketasks/check.md @@ -1,4 +1,4 @@ -# Check Rake Tasks +# Integrity Check Rake Task ## Repository Integrity @@ -29,7 +29,7 @@ exactly which repositories are causing the trouble. ### Check all GitLab repositories This task loops through all repositories on the GitLab server and runs the -3 integrity checks described previously. +integrity check described previously. **Omnibus Installation** @@ -43,33 +43,6 @@ sudo gitlab-rake gitlab:git:fsck sudo -u git -H bundle exec rake gitlab:git:fsck RAILS_ENV=production ``` -### Check repositories for a specific user - -This task checks all repositories that a specific user has access to. This is important -because sometimes you know which user is experiencing trouble but you don't know -which project might be the cause. - -If the rake task is executed without brackets at the end, you will be prompted -to enter a username. - -**Omnibus Installation** - -```bash -sudo gitlab-rake gitlab:user:check_repos -sudo gitlab-rake gitlab:user:check_repos[<username>] -``` - -**Source Installation** - -```bash -sudo -u git -H bundle exec rake gitlab:user:check_repos RAILS_ENV=production -sudo -u git -H bundle exec rake gitlab:user:check_repos[<username>] RAILS_ENV=production -``` - -Example output: - - - ## Uploaded Files Integrity Various types of files can be uploaded to a GitLab installation by users. diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 73b1047d0fa..e5b5f3548e4 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -414,23 +414,6 @@ namespace :gitlab do end end - namespace :user do - desc "GitLab | Check the integrity of a specific user's repositories" - task :check_repos, [:username] => :gitlab_environment do |t, args| - username = args[:username] || prompt("Check repository integrity for username? ".color(:blue)) - user = User.find_by(username: username) - if user - repo_dirs = user.authorized_projects.map do |p| - p.repository.path_to_repo - end - - repo_dirs.each { |repo_dir| check_repo_integrity(repo_dir) } - else - puts "\nUser '#{username}' not found".color(:red) - end - end - end - # Helper methods ########################## |
