An alternative to using eb deploy
is to use the Jenkins AWS Beanstalk Publisher plugin https://wiki.jenkins.io/display/JENKINS/AWS+Beanstalk+Publisher+Plugin
This can be installed by going to Manage Jenkins > Manage Plugins > Search for AWS Beanstalk Publisher. The root object is the zip file of the project that you want to deploy to EB. The Build Steps can execute a step to zip up the files that are in your repo.
- You will still need to fill in the
Source Control Management
section of the Jenkins Job configuration. This must contain the URL of your GitHub repo, and the credentials used to access them.
- Execute Shell as part of the Build Steps which zip up the files from the repo that you want to deploy to EB. For example
zip -r myfiles.zip *
will zip up all the files within your GitHub repo.
- Use the AWS Beanstalk Publisher Plugin and specify
myfiles.zip
as the value of the Root Object (File / Directory).