Improved setup performance by using multiple bundle jobs to install dependencies.

This commit is contained in:
Thorsten Eckel 2017-06-27 16:58:43 +02:00
parent d214106f98
commit 507439e12f
6 changed files with 8 additions and 7 deletions

View file

@ -3,7 +3,7 @@ before_script:
- which ruby - which ruby
- env - env
- test -n "$RNAME" && script/build/test_db_config.sh - test -n "$RNAME" && script/build/test_db_config.sh
- test -n "$RNAME" && bundle install - test -n "$RNAME" && bundle install --jobs 8
stages: stages:
- pre - pre
@ -229,7 +229,7 @@ test:integration:slack:
- rake db:create - rake db:create
- rake db:migrate - rake db:migrate
- echo "gem 'slack-api'" >> Gemfile.local - echo "gem 'slack-api'" >> Gemfile.local
- bundle install - bundle install --jobs 8
- ruby -I test test/integration/slack_test.rb - ruby -I test test/integration/slack_test.rb
- rake db:drop - rake db:drop
@ -427,7 +427,7 @@ test:browser:integration:api_client_ruby:
- script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
- git clone git@github.com:zammad/zammad-api-client-ruby.git || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 1 - git clone git@github.com:zammad/zammad-api-client-ruby.git || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 1
- cd zammad-api-client-ruby - cd zammad-api-client-ruby
- bundle install - bundle install --jobs 8
- export TEST_URL=http://$IP:$BROWSER_PORT - export TEST_URL=http://$IP:$BROWSER_PORT
- rspec || (cd .. && script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 1) - rspec || (cd .. && script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 1)
- cd .. && script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 0 1 - cd .. && script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 0 1

View file

@ -7,6 +7,7 @@ notifications:
env: env:
- DB=mysql - DB=mysql
- DB=postgresql - DB=postgresql
- BUNDLE_JOBS=8
addons: addons:
postgresql: "9.4" postgresql: "9.4"
apt: apt:

View file

@ -10,7 +10,7 @@ Dir.chdir APP_ROOT do
puts '== Installing dependencies ==' puts '== Installing dependencies =='
system 'gem install bundler --conservative' system 'gem install bundler --conservative'
system 'bundle check || bundle install' system 'bundle check || bundle install --jobs 8'
# puts "\n== Copying sample files ==" # puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml") # unless File.exist?("config/database.yml")

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
bundle install bundle install --jobs 8
rm -rf tmp/cache* rm -rf tmp/cache*

View file

@ -79,7 +79,7 @@ sudo -u "${USER}" -H bash -l -c 'rvm alias create default 2.1.2'
sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && gem install rails --no-ri --no-rdoc' sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && gem install rails --no-ri --no-rdoc'
sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && bundle install' sudo -u "${USER}" -H bash -l -c 'cd ~/zammad && bundle install --jobs 8'
DBPASS=$(apg -x8|head -1) DBPASS=$(apg -x8|head -1)
echo Password $DBPASS echo Password $DBPASS

View file

@ -15,7 +15,7 @@ export RAILS_SERVE_STATIC_FILES=true
export ZAMMAD_SETTING_TTL=15 export ZAMMAD_SETTING_TTL=15
export Z_LOCALES=en-us:de-de export Z_LOCALES=en-us:de-de
bundle install bundle install --jobs 8
rm -rf tmp/screenshot* rm -rf tmp/screenshot*
rm -rf tmp/cache* rm -rf tmp/cache*