Here we will
- Simple Spring Webflux based API
- Containerize the application using Docker
- Create CI Jenkins Pipeline
- Build
- Run Unit Tests
- Run Jacoco Reports
- Create Docker Image and Push to DockerHub
- Create CD Pipeline
- Login to AWS
- Pull Docker Image from Docker Hub and create container
- Deploy in AWS EKS
- Configure CI pipeline to be triggered only when code checked-in to any feature/* branches
- Configure CI pipeline to be triggered only when PR raised
- Configure CD pipeline to be triggered only when PR merged
1. Simple Spring Webflux based API
For Sample API, please checkout the code from
- Please check the README.md for how to build locally
- Beer-Service.postman_collection.json for testing the application using postman.
2. Containerize the application using Docker
Add a file name "Dockerfile" into the application folder location.
Add below configuration
Here in above file we use the image adoptopenjdk/openjdk11 We copy the built jar file as beerOrderService.jar We expose the post it need to be executed. The execution command to run application once container started |
3. Create CI Jenkins Pipeline
- Build
- Run Unit Tests
- Run Jacoco Reports
- Create Docker Image and Push to DockerHub
Create Jenkins
- Login to AWS
- Pull Docker Image from Docker Hub and create container
- Deploy in AWS EKS
Configure CI pipeline to be triggered only when PR raised
Configure CD pipeline to be triggered only when PR merged