From 4e267bb1efdd0a295c3b6909f74cf9c60b6856a4 Mon Sep 17 00:00:00 2001 From: Benjamin Neff <benjamin@coding4coffee.ch> Date: Sun, 29 Oct 2017 17:33:26 +0100 Subject: [PATCH] Use configure_bundler script on travis --- .travis.yml | 4 +--- script/ci/build.sh | 8 -------- script/ci/prepare.sh | 11 +++++++++++ 3 files changed, 12 insertions(+), 11 deletions(-) create mode 100755 script/ci/prepare.sh diff --git a/.travis.yml b/.travis.yml index 9661014519..7fc3b0aeb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,14 +24,12 @@ branches: - 'develop' before_install: - - gem install bundler + - script/ci/prepare.sh - mkdir travis-phantomjs - wget http://cifiles.diasporafoundation.org/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 - tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs - export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH -bundler_args: "--deployment --without development --with mysql postgresql --jobs 3 --retry 3" - script: "./script/ci/build.sh" notifications: diff --git a/script/ci/build.sh b/script/ci/build.sh index 7a129f2118..376917c83a 100755 --- a/script/ci/build.sh +++ b/script/ci/build.sh @@ -1,13 +1,5 @@ #!/bin/sh - -# Create a database.yml for the right database -echo "Setting up database.yml for $DB" -cp config/database.yml.example config/database.yml -if [ "$DB" = "mysql" ]; then - sed -i 's/*common/*mysql/' config/database.yml -fi - command="bundle exec rake --trace ci:travis:${BUILD_TYPE}" exec xvfb-run --auto-servernum --server-num=1 --server-args="-screen 0 1280x1024x8" $command diff --git a/script/ci/prepare.sh b/script/ci/prepare.sh new file mode 100755 index 0000000000..6bd574ba4f --- /dev/null +++ b/script/ci/prepare.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Create a database.yml for the right database +echo "Setting up database.yml for ${DB}" +cp config/database.yml.example config/database.yml +if [ "${DB}" = "mysql" ]; then + sed -i 's/*common/*mysql/' config/database.yml +fi + +gem install bundler +script/configure_bundler -- GitLab