Travis CI with Amazon Elastic Beanstalk

amazon-elastic-beanstalk, javascript, travis-ci

Solution

As of 9th Dec 2014, Elastic Beanstalk deployment is not covered in Travis CI deployment documentation: http://docs.travis-ci.com/user/deployment/

However, Travis CI has open sourced their deployment tool: dpl and Elastic Beanstalk deployment is an ongoing development: https://github.com/travis-ci/dpl

It's best to refer to the source itself to figure out how to do the deployment.

At present, here's a working sample of my deployment settings in .travis.yml:

deploy:
  provider: elasticbeanstalk
  access_key_id: <AWS Access Key>
  secret_access_key:
    secure: <secure secret access key>
  region: <region, eg. ap-southeast-1>
  app: <app name>
  env: <environment name>
  bucket_name: <S3 bucket name that is used by elastic beanstalk>
  on:
    repo: <repo name>
    branch: develop

Problem

I have a web application http://codefu-5euzxjdg6b.elasticbeanstalk.com/codeKungfu.jsp that is currently being hosted on Amazon Elastic Beanstalk with a Java backend. The flow process that I have in mind is this: - Commit to GitHub repo - Travis CI is triggered. Run unit tests. - All test cases pass. Deploy on Amazon elastic beanstalk. Currently, I am stuck at Step 3, where I am attempting to link up Travis CI with Amazon elastic beanstalk. I have searched for information online with regards to this but was unable to find anything that seems to be useful. The best information source that I obtained was: https://superuser.com/questions/510593/elastic-beanstalk-rails-application-with-git-source-and-deploy-hooks I understand that Travis CI is able to deploy to Google App Engine directly, and thus I believe that there should be a solution for Amazon Elastic Beanstalk as well. Could anyone kindly point me to resources that could potentially help me solve this issue? Thanks!

Original source