How hmcts/spring-boot-template works
Main Components
• Application Code: Represent the core Java application (the “src/main/java/uk/gov/hmcts/reform/demo” package) that provides the API functionalities.
• Build System: Highlight Gradle as the build tool (see build.gradle, gradlew scripts, and gradle wrapper). Also, show the integrated plugins, including HMCTS Java plugin, Checkstyle, OWASP Dependency Check, JaCoCo, and Spring Boot’s dependency management.
• Deployment Components:
• Docker: Include components for the Dockerfile, docker-compose.yml, and scripts under the “bin” directory. This encapsulates how the app is containerized and run.
• Helm & Kubernetes: Represent Helm charts under “charts/rpe-spring-boot-template” used for deploying the application in a Kubernetes-like environment.
• Configuration & External Dependencies:
• Configuration Files: Illustrate application configuration from src/main/resources/application.yaml and additional security configuration housed in the “config” directory.
• External Services: Show external integrations like publishing API documentation to “hmcts/cnp-api-docs” and integration with external container registries or API documentation services.
Relationships and Interactions
• Output from the build system feeding into Docker (using Dockerfile and docker-compose) to build container images.
• That the built container is deployed via Helm and managed by the infrastructure as code (Terraform in the “infrastructure” folder).
• CI/CD components such as the GitHub workflows and Jenkins pipelines to the build and deployment processes.
• How tests (unit, integration, functional, and smoke) are executed as part of the CI/CD pipeline to ensure quality at different stages.