@jpizarrom
build:
ci:
- npm install serverless@0.5.2
on_success:
- |
cat << EOF > admin.env
SERVERLESS_ADMIN_AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
SERVERLESS_ADMIN_AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
EOF
- cat admin.env
- mkdir .aws
- touch .aws/credentials
- mkdir -p _meta/variables/
- |
cat << EOF > _meta/variables/s-variables-common_.json
{
"project": "$PROJECT"
}
EOF
- |
cat << EOF > _meta/variables/s-variables-$BRANCH.json
{
"stage": "$BRANCH"
}
EOF
- |
cat << EOF > _meta/variables/s-variables-$BRANCH-`echo $AWS_DEFAULT_REGION | sed -e 's/-//g'`.json
{
"region": "$AWS_DEFAULT_REGION",
"resourcesStackName": "$RESOURCES_STACK_NAME",
"iamRoleArnLambda": "$IAM_ROLE_ARN_LAMBDA"
}
EOF
- cd collector/download_list && npm install && cd ../..
- HOME=$PWD ./node_modules/.bin/serverless function deploy collector-download_list -s $BRANCH -r $AWS_DEFAULT_REGION --debug
- cd collector/download_detail && npm install && cd ../..
- HOME=$PWD ./node_modules/.bin/serverless function deploy collector-download_detail -s $BRANCH -r $AWS_DEFAULT_REGION --debug
- cd collector/list_stream_processor && npm install && cd ../..
- HOME=$PWD ./node_modules/.bin/serverless function deploy collector-list_stream_processor -s $BRANCH -r $AWS_DEFAULT_REGION --debug
- cd detector/detector && npm install && cd ../..
- HOME=$PWD ./node_modules/.bin/serverless function deploy detector-detector -s $BRANCH -r $AWS_DEFAULT_REGION --debug
- cd detector/detail_stream_processor && npm install && cd ../..
- HOME=$PWD ./node_modules/.bin/serverless function deploy detector-detail_stream_processor -s $BRANCH -r $AWS_DEFAULT_REGION --debug
- cd notificator/notificator && npm install && cd ../..
- HOME=$PWD ./node_modules/.bin/serverless function deploy notificator-notificator -s $BRANCH -r $AWS_DEFAULT_REGION --debug
- cd elastic/elastic && npm install && cd ../..
- HOME=$PWD ./node_modules/.bin/serverless function deploy elastic-elastic -s $BRANCH -r $AWS_DEFAULT_REGION --debug