Skip to content

Commit

Permalink
Split up CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
durandom committed Oct 28, 2016
1 parent d0826c1 commit d7cca07
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tools/ci/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
set -v

echo "gem: --no-ri --no-rdoc --no-document" > ~/.gemrc
travis_retry gem install bundler -v ">= 1.11.1"

if [[ -n "${GEM}" ]] ; then
cd gems/${GEM}
else
echo "1" > REGION
cp certs/v2_key.dev certs/v2_key
cp config/database.pg.yml config/database.yml
cp config/cable.yml.sample config/cable.yml
psql -c "CREATE USER root SUPERUSER PASSWORD 'smartvm';" -U postgres
export BUNDLE_WITHOUT=development
source $TRAVIS_BUILD_DIR/tools/ci/setup_vmdb_configs.sh
fi
export BUNDLE_GEMFILE=${PWD}/Gemfile

source $TRAVIS_BUILD_DIR/tools/ci/setup_ruby_env.sh

# suites that need bower assets to work: javascript, vmdb
if [[ "$TEST_SUITE" = "javascript" ]] || [[ "$TEST_SUITE" = "vmdb" ]]; then
which bower || npm install -g bower
bower install --allow-root -F --config.analytics=false
source $TRAVIS_BUILD_DIR/tools/ci/setup_js_env.sh
fi

set +v
2 changes: 2 additions & 0 deletions tools/ci/setup_js_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
which bower || npm install -g bower
bower install --allow-root -F --config.analytics=false
4 changes: 4 additions & 0 deletions tools/ci/setup_ruby_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo "gem: --no-ri --no-rdoc --no-document" > ~/.gemrc
travis_retry gem install bundler -v ">= 1.11.1"
export BUNDLE_WITHOUT=development
export BUNDLE_GEMFILE=${PWD}/Gemfile
5 changes: 5 additions & 0 deletions tools/ci/setup_vmdb_configs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "1" > REGION
cp certs/v2_key.dev certs/v2_key
cp config/database.pg.yml config/database.yml
cp config/cable.yml.sample config/cable.yml
psql -c "CREATE USER root SUPERUSER PASSWORD 'smartvm';" -U postgres

0 comments on commit d7cca07

Please sign in to comment.