Commit c2083b79 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Limit test environment size to one project in CI

parent 52e897dd
...@@ -228,10 +228,10 @@ rake db:seed_fu: ...@@ -228,10 +228,10 @@ rake db:seed_fu:
stage: test stage: test
<<: *use-db <<: *use-db
variables: variables:
SIZE: "1"
SETUP_DB: "false" SETUP_DB: "false"
RAILS_ENV: development RAILS_ENV: "development"
script: script:
- mkdir -p /home/git/repositories
- git clone https://gitlab.com/gitlab-org/gitlab-test.git - git clone https://gitlab.com/gitlab-org/gitlab-test.git
/home/git/repositories/gitlab-org/gitlab-test.git /home/git/repositories/gitlab-org/gitlab-test.git
- bundle exec rake db:setup db:seed_fu - bundle exec rake db:setup db:seed_fu
......
...@@ -3,11 +3,11 @@ require 'sidekiq/testing' ...@@ -3,11 +3,11 @@ require 'sidekiq/testing'
Sidekiq::Testing.inline! do Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
project_urls = [ project_urls = [
'https://github.com/documentcloud/underscore.git', 'https://gitlab.com/gitlab-org/gitlab-test.git',
'https://gitlab.com/gitlab-org/gitlab-ce.git', 'https://gitlab.com/gitlab-org/gitlab-ce.git',
'https://gitlab.com/gitlab-org/gitlab-ci.git', 'https://gitlab.com/gitlab-org/gitlab-ci.git',
'https://gitlab.com/gitlab-org/gitlab-shell.git', 'https://gitlab.com/gitlab-org/gitlab-shell.git',
'https://gitlab.com/gitlab-org/gitlab-test.git', 'https://github.com/documentcloud/underscore.git',
'https://github.com/twitter/flight.git', 'https://github.com/twitter/flight.git',
'https://github.com/twitter/typeahead.js.git', 'https://github.com/twitter/typeahead.js.git',
'https://github.com/h5bp/html5-boilerplate.git', 'https://github.com/h5bp/html5-boilerplate.git',
...@@ -38,12 +38,7 @@ Sidekiq::Testing.inline! do ...@@ -38,12 +38,7 @@ Sidekiq::Testing.inline! do
] ]
# You can specify how many projects you need during seed execution # You can specify how many projects you need during seed execution
size = if ENV['SIZE'].present? size = ENV['SIZE'].present? ? ENV['SIZE'].to_i : 8
ENV['SIZE'].to_i
else
8
end
project_urls.first(size).each_with_index do |url, i| project_urls.first(size).each_with_index do |url, i|
group_path, project_path = url.split('/')[-2..-1] group_path, project_path = url.split('/')[-2..-1]
......
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