-
Notifications
You must be signed in to change notification settings - Fork 0
/
shippable.yml
46 lines (39 loc) · 1.4 KB
/
shippable.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# exclude
branches:
except:
- master
# include
branches:
only:
- master
language: scala
scala:
- 2.11.7
jdk:
- oraclejdk8
node_js:
- "0.12.7"
notifications:
email:
recipients:
on_success: change
on_failure: always
# aws access key of user with s3 and beanstalk access
env:
global:
- AWS_ACCESS_KEY_ID=<ACCESS_KEY>
- secure: <shippable secured secret in settings: AWS_SECRET_ACCESS_KEY=<AWS_SECRET> >
script:
- export SBT_OPTS="-Xmx512M -Xss512M -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Duser.timezone=UTC"
- sbt compile test stage dist docker:stage
after_success:
- cp -R beanstalk/. target/docker
- cp -R newrelic target/docker/stage
- cd target/docker
- jar -cMf docker-$BUILD_NUMBER.zip .
- aws s3 cp docker-$BUILD_NUMBER.zip s3://<YOUR_BUCKET>/docker-$BUILD_NUMBER.zip
- aws elasticbeanstalk create-application-version --application-name <YOUR_APPLICATION> --version-label $BUILD_NUMBER --source-bundle S3Bucket=<YOUR_BUCKET>,S3Key=docker-$BUILD_NUMBER.zip --region us-east-1
- aws elasticbeanstalk update-environment --environment-name <WEB_ENVIRONMENT> --version-label $BUILD_NUMBER --region us-east-1
# If you want to do a worker tier,
# - aws elasticbeanstalk update-environment --environment-name <WORKER_ENV_NAME> --version-label $BUILD_NUMBER --region us-east-1