diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a08ffa449d83bfc6aa7780e9f1ea0537a8f26e23..e7e4cbf39ac4b723d45523d994fce62cbf5d78dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ Please send a merge request with a tested solution or a merge request with a fai 1. **Observed behavior** 1. **Relevant logs and/or screenshots:** Please use code blocks (\`\`\`) to format console output, logs, and code as it's very hard to read otherwise. 1. **Output of checks** - * Results of GitLab [Application Check](doc/install/installation.md#check-application-status) (`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production`); we will only investigate if the tests are passing + * Results of GitLab [Application Check](doc/install/installation.md#check-application-status) (`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`); we will only investigate if the tests are passing * Version of GitLab you are running; we will only investigate issues in the latest stable and development releases as per the [maintenance policy](MAINTENANCE.md) * Add the last commit sha1 of the GitLab version you used to replicate the issue (obtainable from the help page) * Describe your setup (use relevant parts from `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`) diff --git a/doc/install/installation.md b/doc/install/installation.md index 37f9377256c1d5c2aeae6406ef823452d609ccf2..b5ebb2694b9c96b4d45a65e456f8880ec2d5d8e3 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -331,6 +331,8 @@ To make sure you didn't miss anything run a more thorough check with: If all items are green, then congratulations on successfully installing GitLab! +NOTE: Supply `SANITIZE=true` environment variable to `gitlab:check` to omit project names from the output of the check command. + ### Initial Login Visit YOUR_SERVER in your web browser for your first GitLab login. The setup has created an admin account for you. You can use it to log in: diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index 3339dfb03ace10022a338266650480c7d0cd688a..9f5d21527c375c91969459b37facf249a4477768 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -63,6 +63,8 @@ sudo gitlab-rake gitlab:check bundle exec rake gitlab:check RAILS_ENV=production ``` +NOTE: Use SANITIZE=true for gitlab:check if you want to omit project names from the output. + Example output: ``` diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 34116568e9996957069133d7be997483fbbb64ba..28fc56591cb2efc70e874fd8a7fea267fd07be6a 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -216,7 +216,7 @@ namespace :gitlab do puts "" Project.find_each(batch_size: 100) do |project| - print "#{project.name_with_namespace.yellow} ... " + print sanitized_message(project) if project.satellite.exists? puts "yes".green @@ -525,7 +525,7 @@ namespace :gitlab do puts "" Project.find_each(batch_size: 100) do |project| - print "#{project.name_with_namespace.yellow} ... " + print sanitized_message(project) if project.empty_repo? puts "repository is empty".magenta @@ -588,7 +588,7 @@ namespace :gitlab do puts "" Project.find_each(batch_size: 100) do |project| - print "#{project.name_with_namespace.yellow} ... " + print sanitized_message(project) if project.namespace puts "yes".green @@ -837,4 +837,20 @@ namespace :gitlab do def omnibus_gitlab? Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails' end + + def sanitized_message(project) + if sanitize + "#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... " + else + "#{project.name_with_namespace.yellow} ... " + end + end + + def sanitize + if ENV['SANITIZE'] == "true" + true + else + false + end + end end