Use Amazon SES on travis
This commit is contained in:
parent
ff15e8f895
commit
3a91aacbbf
12
.elasticbeanstalk/config.yml
Normal file
12
.elasticbeanstalk/config.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
branch-defaults:
|
||||||
|
release/prod:
|
||||||
|
environment: keyserver-prod
|
||||||
|
release/test:
|
||||||
|
environment: keyserver-test
|
||||||
|
global:
|
||||||
|
application_name: keyserver
|
||||||
|
default_ec2_keyname: null
|
||||||
|
default_platform: Node.js
|
||||||
|
default_region: eu-west-1
|
||||||
|
profile: eb-cli
|
||||||
|
sc: git
|
@ -14,4 +14,4 @@ notifications:
|
|||||||
services:
|
services:
|
||||||
- mongodb
|
- mongodb
|
||||||
env:
|
env:
|
||||||
- MONGO_URI=127.0.0.1:27017/test_db MONGO_USER=travis MONGO_PASS=test SMTP_HOST=127.0.0.1 SMTP_PORT=465 SMTP_TLS=true SMTP_STARTTLS=true SMTP_PGP=true SMTP_USER=smtp_user SMTP_PASS=smtp_pass SENDER_NAME=Travis SENDER_EMAIL=travis@mailvelope.com
|
- MONGO_URI=127.0.0.1:27017/test_db MONGO_USER=travis MONGO_PASS=test
|
34
res/aws_release.sh
Executable file
34
res/aws_release.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# go to root
|
||||||
|
cd `dirname $0`
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
if [ "$1" != "prod" ] && [ "$1" != "test" ] ; then
|
||||||
|
echo 'Usage: ./res/aws_release prod|test'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# switch branch
|
||||||
|
git checkout master
|
||||||
|
git branch -D release/$1
|
||||||
|
git checkout -b release/$1
|
||||||
|
git merge master --no-edit
|
||||||
|
|
||||||
|
# install only production dependencies
|
||||||
|
rm -rf node_modules/
|
||||||
|
npm install --production
|
||||||
|
|
||||||
|
# delete .gitignore files before adding to git for aws deployment
|
||||||
|
find node_modules/ -name ".gitignore" -exec rm -rf {} \;
|
||||||
|
|
||||||
|
# Add runtime dependencies to git
|
||||||
|
sed -i "" '/node_modules/d' .gitignore
|
||||||
|
git add .gitignore node_modules/
|
||||||
|
git commit -m "Update release"
|
||||||
|
|
||||||
|
# push to aws
|
||||||
|
eb deploy keyserver-$1
|
||||||
|
|
||||||
|
# switch back to master branch
|
||||||
|
git checkout master
|
@ -21,9 +21,7 @@ describe('Email Integration Tests', function() {
|
|||||||
try {
|
try {
|
||||||
credentials = require('../../credentials.json');
|
credentials = require('../../credentials.json');
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
log.warn('email-test', 'No credentials.json found ... skipping tests.');
|
log.info('email-test', 'No credentials.json found ... using environment vars.');
|
||||||
this.skip();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
publicKeyArmored = require('fs').readFileSync(__dirname + '/../key1.asc', 'utf8');
|
publicKeyArmored = require('fs').readFileSync(__dirname + '/../key1.asc', 'utf8');
|
||||||
origin = {
|
origin = {
|
||||||
|
Loading…
Reference in New Issue
Block a user