Commit 54b21556 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rs-skip-nested-groups-seed' into 'master'

Move the nested groups seed behind an environment flag

See merge request !10601
parents 6975a77e d33fc982
...@@ -223,7 +223,9 @@ class Gitlab::Seeder::CycleAnalytics ...@@ -223,7 +223,9 @@ class Gitlab::Seeder::CycleAnalytics
end end
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
if ENV['SEED_CYCLE_ANALYTICS'] flag = 'SEED_CYCLE_ANALYTICS'
if ENV[flag]
Project.all.each do |project| Project.all.each do |project|
seeder = Gitlab::Seeder::CycleAnalytics.new(project) seeder = Gitlab::Seeder::CycleAnalytics.new(project)
seeder.seed! seeder.seed!
...@@ -235,6 +237,6 @@ Gitlab::Seeder.quiet do ...@@ -235,6 +237,6 @@ Gitlab::Seeder.quiet do
seeder = Gitlab::Seeder::CycleAnalytics.new(Project.order(:id).first, perf: true) seeder = Gitlab::Seeder::CycleAnalytics.new(Project.order(:id).first, perf: true)
seeder.seed_metrics! seeder.seed_metrics!
else else
puts "Not running the cycle analytics seed file. Use the `SEED_CYCLE_ANALYTICS` environment variable to enable it." puts "Skipped. Use the `#{flag}` environment variable to enable."
end end
end end
...@@ -27,6 +27,9 @@ end ...@@ -27,6 +27,9 @@ end
Sidekiq::Testing.inline! do Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
flag = 'SEED_NESTED_GROUPS'
if ENV[flag]
project_urls = [ project_urls = [
'https://android.googlesource.com/platform/hardware/broadcom/libbt.git', 'https://android.googlesource.com/platform/hardware/broadcom/libbt.git',
'https://android.googlesource.com/platform/hardware/broadcom/wlan.git', 'https://android.googlesource.com/platform/hardware/broadcom/wlan.git',
...@@ -65,5 +68,8 @@ Sidekiq::Testing.inline! do ...@@ -65,5 +68,8 @@ Sidekiq::Testing.inline! do
print 'F' print 'F'
end end
end end
else
puts "Skipped. Use the `#{flag}` environment variable to enable."
end
end 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