Architecture Diagram
Workflows
There are total 3 workflows
pr.yaml
- Whenever any feature branch creates a pull request tomain
branch, pr.yaml gets executed. Following tests will run on creating pull request. If any test fails, Pull request won't be able to merge to main branch- Code linting
- Unit tests
- Security scans
build.yaml
- Whenever there is a push to main branch or any feature branch gets merged to main branch, this workflow gets triggered. this workflow does following jobs- Builds docker image
- Push docker image to dockerhub. (Note: I haven't used ECR here)
- Run security scan for built image
deploy.yaml
- If build.yaml workflow succeeds, then this workflow gets triggered. This workflow forces new deployment in ecs, which will pull latest image. (I don't have work experience in ECS, I have deployed as per my understanding)