Add sanitize option to gitlab check rake task.
This commit is contained in:
parent
d5a8f9ccca
commit
4c68d2387e
|
|
@ -216,7 +216,12 @@ namespace :gitlab do
|
||||||
puts ""
|
puts ""
|
||||||
|
|
||||||
Project.find_each(batch_size: 100) do |project|
|
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?
|
if project.satellite.exists?
|
||||||
puts "yes".green
|
puts "yes".green
|
||||||
|
|
@ -525,7 +530,12 @@ namespace :gitlab do
|
||||||
puts ""
|
puts ""
|
||||||
|
|
||||||
Project.find_each(batch_size: 100) do |project|
|
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?
|
if project.empty_repo?
|
||||||
puts "repository is empty".magenta
|
puts "repository is empty".magenta
|
||||||
|
|
@ -588,7 +598,12 @@ namespace :gitlab do
|
||||||
puts ""
|
puts ""
|
||||||
|
|
||||||
Project.find_each(batch_size: 100) do |project|
|
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
|
if project.namespace
|
||||||
puts "yes".green
|
puts "yes".green
|
||||||
|
|
@ -837,4 +852,12 @@ namespace :gitlab do
|
||||||
def omnibus_gitlab?
|
def omnibus_gitlab?
|
||||||
Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails'
|
Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sanitize
|
||||||
|
if ENV['SANITIZE'] == "true"
|
||||||
|
true
|
||||||
|
else
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue