ingenieux / awseb-deployment-plugin

Jenkins Plugin for AWS Elastic Beanstalk
Apache License 2.0
29 stars 53 forks source link

Pushing to two environments (in the same Application) #42

Closed hayd closed 7 years ago

hayd commented 8 years ago

I have the same build that I wish to push to multiple environments within the same application.

I can reuse the s3 object through the console (by looking at the Application Versions), but it'd be great if there was a way to do this within the awseb plugin. (At the moment, we're just building twice!)

aldrinleal commented 8 years ago

Sorry, thought it was beanstalker instead :)

Well, patches welcome! :)

hayd commented 8 years ago

Thanks! A note to myself (if I can get round to this), or a anyone else reading: I think the solution is to make environmentNames a String Array (Note: this is what ZeroDowntime expects).

See http://stackoverflow.com/a/19087873/1240268.

FoxxMD commented 7 years ago

I'm looking for this functionality as well..

hayd commented 7 years ago

Is this functionality added now?

aldrinleal commented 7 years ago

No. But patches are welcome.

Twistedst commented 7 years ago

I added this functionality in a PR. This is my fork for this Forked Repo. It might not be too pretty, but it works. I've never done a Jenkins plugin, so yeah.

hayd commented 7 years ago

We moved to using the aws cli manually:

aws s3 cp target/app.zip s3://my-elasticbeanstalk-deployments/my-app.$BUILD_NUMBER.$(git rev-parse --short HEAD).zip
aws elasticbeanstalk create-application-version --application-name my-app --version-label my-app.$BUILD_NUMBER.$(git rev-parse --short HEAD) --source-bundle S3Bucket="my-elasticbeanstalk-deployments",S3Key="my-app.$BUILD_NUMBER.$(git rev-parse --short HEAD).zip" --region=us-west-2
aws elasticbeanstalk update-environment --application-name my-app --environment-name my-env --version-label my-app.$BUILD_NUMBER.$(git rev-parse --short HEAD) --region=us-west-2
# repeat the line above to reference the same version-label for a different env