I’ve recently started using Codeship – a cloud based Continuous Integration and Deployment environment – for a “Just for fun” project I needed to deploy to AWS, specifically to Elastic Beanstalk. At the time of this writing, there were no AWS plugins available on Codeship to make this deployment possible but, thanks to one of their Engineers (thanks you Florian), I was able to make it happen using the “Custom Script” option on Codeship, and the “ebs_deploy” tool by Brian Dilley.
As per the docs of Ebs Deploy, I added a “ebs.config” file in my repository that contains details about my AWS settings, my Elastic Beanstalk app settings and my environments. It also contains a section defining the type of file I want uploaded as well as the command the would build that file.
With that added, I changed my deployment setting on my project in Codeship to use the “Custom Script” option, and entered the following commands
The first command ensures that Ebs Deploy is present on my environment. The second initialize my environments based on the ebs.config, which can be useful should I change/add new environments to that file. Finally, the third command does the actual deployment.
Et voila! I hope this helps!