summaryrefslogtreecommitdiff
path: root/db/fixtures/development/17_cycle_analytics.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-04-10 16:18:58 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-04-10 16:18:58 -0400
commitd33fc982f554a0c58d19b81f31967134b2140c72 (patch)
treeb2a9479d425050c67be99c61082ca74d5e861d2a /db/fixtures/development/17_cycle_analytics.rb
parent9c576cc7e9414e64b4aac0544615e7d5e92c3558 (diff)
downloadgitlab-ce-d33fc982f554a0c58d19b81f31967134b2140c72.tar.gz
Move the nested groups seed behind an environment flagrs-skip-nested-groups-seed
This seed downloads 2.1 GB worth of repositories. Google can afford the bandwidth, but if a person using the GDK is on a metered connection, that's not so great. Also the GDK test suite runs this seed, so every CI run for that project had to download those as well. Needlessly wasteful.
Diffstat (limited to 'db/fixtures/development/17_cycle_analytics.rb')
-rw-r--r--db/fixtures/development/17_cycle_analytics.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index 4bc735916c1..0d7eb1a7c93 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -223,7 +223,9 @@ class Gitlab::Seeder::CycleAnalytics
end
Gitlab::Seeder.quiet do
- if ENV['SEED_CYCLE_ANALYTICS']
+ flag = 'SEED_CYCLE_ANALYTICS'
+
+ if ENV[flag]
Project.all.each do |project|
seeder = Gitlab::Seeder::CycleAnalytics.new(project)
seeder.seed!
@@ -235,6 +237,6 @@ Gitlab::Seeder.quiet do
seeder = Gitlab::Seeder::CycleAnalytics.new(Project.order(:id).first, perf: true)
seeder.seed_metrics!
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