I have a web application .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:
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!
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!
Share Improve this question edited Mar 20, 2017 at 10:18 CommunityBot 11 silver badge asked Apr 10, 2013 at 5:59 Alvin KwangAlvin Kwang 1111 silver badge3 bronze badges2 Answers
Reset to default 22As 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
Did you end up making progress on this? I think that it should be possible with Travis's encrypted variables to store a key or your AWS credentials. Then you could use those credentials with the AWS API to do the deploy itself from within your .travis.yml after_script section.