Currently I can deploy my Ruby on Rails app to a pre-configured ec2 instance using Capistrano cap production deploy.
I'm trying to use CodeCommit, CodeBuild, CodeDeploy and CodePipeline.

I'm thinking of adding a CodeDeploy after the build passed from CodeBuild.
How can I use CodeDeploy to run a script like cap production deploy and deploy to my instance?
CodeDeploy allows script execution using lifecycle hook: http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html. You can add a script that execute the command and specify the script in the ApplicationStart section of your appspec file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With