Skip to content

Instantly share code, notes, and snippets.

@GitsMcGee
Created December 14, 2014 22:42
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save GitsMcGee/242abdabda119df02037 to your computer and use it in GitHub Desktop.
Save GitsMcGee/242abdabda119df02037 to your computer and use it in GitHub Desktop.
CircleCI config for Play 2.3 and Elastic Beanstalk
machine:
environment:
JAVA_TOOL_OPTIONS: '-Dfile.encoding=UTF8 -Duser.timezone=UTC'
_JAVA_OPTIONS: '-Xms512m -Xmx1024m -Xss2m'
java:
version: oraclejdk8
python:
version: 2.7.6
services:
- docker
dependencies:
cache_directories:
- ~/.sbt
pre:
- pip install awscli
override:
- "./activator compile":
timeout: 300
test:
override:
- "./activator test docker:stage":
timeout: 900
post:
- cp -R target/test-reports $CI_REPORTS
- cd target/docker; zip -r ../homebay-docker-$CIRCLE_SHA1.zip .; cd ../../
- cp target/homebay-docker-$CIRCLE_SHA1.zip $CIRCLE_ARTIFACTS
deployment:
prod:
branch: master
commands:
- aws s3 cp $CIRCLE_ARTIFACTS/homebay-docker-$CIRCLE_SHA1.zip s3://homebay-deployments/homebay-docker-$CIRCLE_SHA1.zip
- aws elasticbeanstalk create-application-version --application-name HomeBay --version-label $CIRCLE_SHA1 --source-bundle S3Bucket=homebay-deployments,S3Key=homebay-docker-$CIRCLE_SHA1.zip --region us-east-1
- aws elasticbeanstalk update-environment --environment-name homebay-web --version-label $CIRCLE_SHA1 --region us-east-1
@philihp
Copy link

philihp commented Feb 9, 2015

What's the purpose of this?

    JAVA_TOOL_OPTIONS: '-Dfile.encoding=UTF8 -Duser.timezone=UTC'
    _JAVA_OPTIONS: '-Xms512m -Xmx1024m -Xss2m'

@GitsMcGee
Copy link
Author

Those settings will get picked up by activator when it runs. They are similar to the settings that I use in production, so it allows the unit tests to be run with something as close to the production settings as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment