11

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!

4

2 回答 2

23

自 2014 年 12 月 9 日起,Elastic Beanstalk 部署未包含在 Travis CI 部署文档中: http: //docs.travis-ci.com/user/deployment/

然而,Travis CI 已经开源了他们的部署工具:dpl和 Elastic Beanstalk 部署是一个持续的开发: https ://github.com/travis-ci/dpl

最好参考源代码本身以了解如何进行部署。

目前,这是我在 .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
于 2014-12-09T04:43:46.990 回答
2

你最终在这方面取得了进展吗?我认为 Travis 的加密变量应该可以存储密钥或您的 AWS 凭证。然后,您可以将这些凭证与 AWS API 一起使用,在您的 .travis.yml after_script 部分中自行部署。

于 2013-04-12T18:28:29.367 回答