A simple Java Hello World application with unit tests and coverage reports.
This repo demonstrates the following features:
- Set up serverless CI, i.e. on Shippable-provided infrastructure
- Set up CD pipelines for deploying a docker image to a Single Container Docker Configuration on Amazon Elastic Beanstalk
- Perform CI tests
- Perform Maven build to generate .war package
- Perform docker build to create Tomcat server with .war package
- Push docker image to Amazon ECR
- Automatically deploy docker image to TEST environment on Elastic Beanstalk
- Manually deploy docker image to PROD environment on Elastic Beanstalk
- Set up runCLI job types in Shippable using AWS EB CLI
- Fork this repo into your source code account (e.g. GitHub)
- Create an account (or login) on Shippable with your SCM account
- Create an integration on Shippable for authenticating CI to AWS
- Update the CI configuration in
shippable.yml
file with your integration names (see comments in file)
- Pipeline configs are in
shippable.resources.yml
andshippable.jobs.yml
Check these files and update config wherever the comment asks you to replace with your specific values - Follow instructions to add your Continuous Deployment pipeline
- Right-click on the runCLI job in the SPOG view named 'demo-java-ecr-test-deploy'
and run the job
- This demo uses custom scripting jobs called 'runCLI' jobs in Shippable - learn how more about runCLI jobs here
- Your app should be deployed to your Elastic Beanstalk Test environment
- See http://{your-IP-address}:{your-test-env-port}/HelloWorld/hello in your browser
- Right-click on the runCLI job in the SPOG view named 'demo-java-ecr-prod-deploy'
and run the job to deploy to your Prod instance
- See http://{your-IP-address}:{your-prod-env-port}/HelloWorld/hello in your browser
- Make a change to your forked repo and commit to GitHub - watch your pipeline automatically execute CI with push to Amazon ECR and automatic deployment to the Test environment in Amazon Elastic Beanstalk
- Then right-click to deploy the newest changes to the Prod environment
Your end-to-end pipeline is complete! Now, any change you make to the application will be deployed to your Amazon Elastic Beanstalk Test instance and be ready to manually deploy a Prod instance, as well.