A Hello World Spring Boot App
Pipeline Diagram
Workflows
There are total 3 workflows
create_repository.yaml
- This is first workflow that gets executed when the code is pushed to
master
branch - It creates the docker hub repository using terraform.
- terraform code resides under
terraform
directory at the root level
- This is first workflow that gets executed when the code is pushed to
build.yml
- This workflow gets executed when
Create dockerhub repository
workflow succeeds. - Builds docker image
- Push docker image to dockerhub
- This workflow gets executed when
security_scan.yaml
- This workflow gets executed when
Build and Push
workflow succeeds. - Runs vulnerability scan for the uploaded image
- This workflow gets executed when
Deployment
Once image is uploaded, we now need to deploy and test the solution. To deploy the solution, kindly refer to scripts/deploy.sh
script.
Pre-requisites for deployment
docker
-> in started statecurl
bash shell
Execution step
- Run
cd scripts && chmod +x deploy.sh && ./deploy.sh
curl http://localhost:8080
=> should return Hello World response
Note
jib build is failing for some reason, didn't have much chance to investigate into more details due to time crunch. I have commented that particular workflow.