Commit 4c68d238 authored by Marin Jankovski's avatar Marin Jankovski

Add sanitize option to gitlab check rake task.

parent d5a8f9cc
......@@ -216,7 +216,12 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
print "#{project.name_with_namespace.yellow} ... "
message = if sanitize
"#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
else
"#{project.name_with_namespace.yellow} ... "
end
print message
if project.satellite.exists?
puts "yes".green
......@@ -525,7 +530,12 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
print "#{project.name_with_namespace.yellow} ... "
message = if sanitize
"#{project.id.to_s.yellow} ... "
else
"#{project.name_with_namespace.yellow} ... "
end
print message
if project.empty_repo?
puts "repository is empty".magenta
......@@ -588,7 +598,12 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
print "#{project.name_with_namespace.yellow} ... "
message = if sanitize
"#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
else
"#{project.name_with_namespace.yellow} ... "
end
print message
if project.namespace
puts "yes".green
......@@ -837,4 +852,12 @@ namespace :gitlab do
def omnibus_gitlab?
Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails'
end
def sanitize
if ENV['SANITIZE'] == "true"
true
else
false
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment