summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-07 13:33:11 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-07 13:33:11 +0000
commit5a67d482afd7780506c0dc2689a7d839647d5da5 (patch)
treee2ac66f3bd554c9171a8b69737fbd3f92eb726ca
parentd5a8f9ccca0b206c6a111c81a9c1ac2340974e1a (diff)
parentcb4d8eff4cb158fbef4d59bf64e04e776e29eaed (diff)
downloadgitlab-ce-5a67d482afd7780506c0dc2689a7d839647d5da5.tar.gz
Merge branch 'sanitize_rake_check_output' into 'master'
Sanitize rake check output Fixes #1206 See merge request !952
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--doc/install/installation.md2
-rw-r--r--doc/raketasks/maintenance.md2
-rw-r--r--lib/tasks/gitlab/check.rake22
4 files changed, 24 insertions, 4 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a08ffa449d8..e7e4cbf39ac 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 37f9377256c..b5ebb2694b9 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 3339dfb03ac..9f5d21527c3 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 34116568e99..28fc56591cb 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