From bbf24d6c53bf3347a27fc944a643091f24791f2c Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Mon, 14 Aug 2017 19:29:16 +0800 Subject: [PATCH] Add AWS Elastic Beanstalk deployment plugin to travis config Run npm release script before deployment Upgrade to node v8 in travis job --- .travis.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c2c4e5f..ef916cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,35 @@ sudo: false language: node_js node_js: - - "6" -before_script: - - mongo test_db --eval 'db.addUser("travis", "test");' + - "8" + +env: + - NODE_ENV=integration MONGO_URI=127.0.0.1:27017/test_db MONGO_USER=travis MONGO_PASS=test + notifications: email: - build@mailvelope.com + services: - mongodb -env: - - NODE_ENV=integration MONGO_URI=127.0.0.1:27017/test_db MONGO_USER=travis MONGO_PASS=test \ No newline at end of file + +before_script: + - mongo test_db --eval 'db.addUser("travis", "test");' + +before_deploy: + - npm run release + +deploy: + skip_cleanup: true + provider: elasticbeanstalk + access_key_id: $AWS_ACCESS_KEY + secret_access_key: $AWS_SECRET_ACCESS_KEY + region: eu-west-1 + app: keyserver + env: keyserver-prod + zip_file: release.zip + bucket_name: elasticbeanstalk-eu-west-1-936909551620 + bucket_path: keyserver + on: + repo: mailvelope/keyserver + branch: master