summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-09-23 10:21:12 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-09-23 10:21:12 +0200
commitc2083b79974de34ffb2d44ec486c40323a99228c (patch)
tree49bb74244985d3fad2df2924fba81ce1994ab1c6
parent52e897dd14c423332188cae4785ecf6e1182cede (diff)
downloadgitlab-ce-c2083b79974de34ffb2d44ec486c40323a99228c.tar.gz
Limit test environment size to one project in CI
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--db/fixtures/development/04_project.rb11
2 files changed, 5 insertions, 10 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3dfab341e39..3f3873e57c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -228,10 +228,10 @@ rake db:seed_fu:
stage: test
<<: *use-db
variables:
+ SIZE: "1"
SETUP_DB: "false"
- RAILS_ENV: development
+ RAILS_ENV: "development"
script:
- - mkdir -p /home/git/repositories
- git clone https://gitlab.com/gitlab-org/gitlab-test.git
/home/git/repositories/gitlab-org/gitlab-test.git
- bundle exec rake db:setup db:seed_fu
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb
index e3316ecdb6c..a984eda5ab5 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/04_project.rb
@@ -3,11 +3,11 @@ require 'sidekiq/testing'
Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do
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-ci.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/typeahead.js.git',
'https://github.com/h5bp/html5-boilerplate.git',
@@ -38,12 +38,7 @@ Sidekiq::Testing.inline! do
]
# You can specify how many projects you need during seed execution
- size = if ENV['SIZE'].present?
- ENV['SIZE'].to_i
- else
- 8
- end
-
+ size = ENV['SIZE'].present? ? ENV['SIZE'].to_i : 8
project_urls.first(size).each_with_index do |url, i|
group_path, project_path = url.split('/')[-2..-1]