sudo: false
 
language: node_js
 
before_install:
  - curl https://install.meteor.com | /bin/sh
  - npm install -g mupx
  - export PATH="$HOME/.meteor:$PATH"
 
cache:
  directories:
    - node_modules
 
before_script:
  - meteor npm install
 
script:
  - meteor npm run test
  
after_success:
  - echo "-----BEGIN RSA PRIVATE KEY-----" > data-furnace-deployment
  - env | grep DATAFURNACEDEPLOYMENT | cut -c 23- | fold -w 64 >> data-furnace-deployment
  - echo "-----END RSA PRIVATE KEY-----" >> data-furnace-deployment
  - test $TRAVIS_BRANCH == "development" && mupx deploy
  - test $TRAVIS_BRANCH == "development" && ssh -o StrictHostKeyChecking=no -i data-furnace-deployment data-furnace@46.101.183.252 'export LC_ALL=C.UTF-8 && cd data-furnace && git pull origin development && mongo --port 27017 data-furnace --eval "printjson(db.dropDatabase())" && mongorestore --port 27017 --db data-furnace .mongodb-dump/meteor/'

sudo: false
 
language: node_js
 
before_install:
  - curl https://install.meteor.com | /bin/sh
  - npm install -g mupx
  - export PATH="$HOME/.meteor:$PATH"
 
cache:
  directories:
    - node_modules
 
before_script:
  - meteor npm install
 
script:
  - meteor npm run test
  
after_success:
  - echo "-----BEGIN RSA PRIVATE KEY-----" > data-furnace-deployment
  - env | grep DATAFURNACEDEPLOYMENT | cut -c 23- | fold -w 64 >> data-furnace-deployment
  - echo "-----END RSA PRIVATE KEY-----" >> data-furnace-deployment
  - test $TRAVIS_BRANCH == "development" && mupx deploy
  - test $TRAVIS_BRANCH == "development" && chmod 600 data-furnace-deployment && ssh -o StrictHostKeyChecking=no -i data-furnace-deployment data-furnace@46.101.183.252 'export LC_ALL=C.UTF-8 && cd data-furnace && git pull origin development && mongo --port 27017 data-furnace --eval "printjson(db.dropDatabase())" && mongorestore --port 27017 --db data-furnace .mongodb-dump/meteor/'

Make ssh key only writable and readable by own user
Make ssh key only writable  and readable by own user
