问题
I want to deploy a java application(Liferay) to Beanstalk from Teamcity when a build succeeds. I can't find anything online, please suggest.
Thankyou
回答1:
Here is an example for PHP, but you can use it with any other platform (via CLI): http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_eb.sdlc.html
UPD: Here is an even better way: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-eb.html. Just command line tool. You can run it in TeamCity build step.
回答2:
I know it's old but I did it recently with lots of struggle but may help others.
1) Create a windows build agent (if not already created).
2) Using the remote desktop connection connect your system with Build agent (Yes, we can do that for windows agent).
3) Install and configure the AWS CLI in the build agent machine using RDC.
4) In build steps, first create the build and get the artifacts that you want to deploy and run the below steps on Command line:
-> aws s3 cp target/MyApp.jar s3://BucketName/Myapp.jar
-> aws elasticbeanstalk create-application-version --application-name ApplicationNameofEB --version-label MyApp --source-bundle S3Bucket="BucketName,S3Key="Myapp.jar"
-> aws elasticbeanstalk update-environment --application-name ApplicationNameofEB --environment-name Envthatyoucreated --version-label MyApp
Let me know if you require any more information
来源:https://stackoverflow.com/questions/24954695/how-to-deploy-to-aws-elastic-beanstalk-on-successful-teamcity-build