Add Staging specific seed file (#19434)
This commit is contained in:
parent
4c28a607ec
commit
b4a4b30153
4 changed files with 14 additions and 4 deletions
|
|
@ -14,6 +14,7 @@ ignore:
|
|||
- "**/*.svg"
|
||||
- "lib/sitemap_generator"
|
||||
- "lib/generators"
|
||||
- "lib/tasks/custom_seeds.rake"
|
||||
coverage:
|
||||
status:
|
||||
patch:
|
||||
|
|
|
|||
2
db/seeds_staging.rb
Normal file
2
db/seeds_staging.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
filename = Rails.root.join("db/seeds.rb")
|
||||
load(filename)
|
||||
|
|
@ -8,7 +8,7 @@ namespace :db do
|
|||
raise "Attempting to seed production environment, aborting!" if Rails.env.production?
|
||||
|
||||
filename = SEED_DIR.join("seeds_e2e.rb")
|
||||
load(filename) if File.exist?(filename)
|
||||
load(filename)
|
||||
end
|
||||
|
||||
desc "Creator Onboarding seed data for e2e tests"
|
||||
|
|
@ -16,7 +16,14 @@ namespace :db do
|
|||
raise "Attempting to seed production environment, aborting!" if Rails.env.production?
|
||||
|
||||
filename = SEED_DIR.join("creator_onboarding_seed_e2e.rb")
|
||||
load(filename) if File.exist?(filename)
|
||||
load(filename)
|
||||
end
|
||||
|
||||
desc "Preview environment seed data for Uffizzi"
|
||||
task staging: :environment do
|
||||
raise "Attempting to seed production environment, aborting!" if Rails.env.production?
|
||||
|
||||
load(Rails.root.join("db/seeds_staging.rb"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
bundle exec rake db:seed
|
||||
SEEDS_MULTIPLIER=2 bundle exec rake db:seed:staging
|
||||
|
||||
tail -f /dev/null
|
||||
tail -f /dev/null
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue