How tanchengbin/jenkins-ci-demo works
Project Type and Purpose
• This is a single‐service backend application built with Spring Boot. It exposes a simple RESTful API (GET /api/info) that returns system metadata (name, version, author). The project serves as the “Backend” half of a Jenkins CI/CD demonstration.
Core Architectural Components
a. Source Code Repository (GitHub)
b. CI/CD Server (Jenkins)
c. Build Tool (Maven)
d. Runtime Service (Spring Boot Application)
e. Configuration (application.yml)
f. API Consumers (e.g., Frontend demo app or any HTTP client)
Relationships and Interactions
• On code check-in to GitHub, Jenkins triggers a pipeline:
1. Checkout source
2. mvn clean compile → mvn test → mvn package
3. Deploy artifact (e.g., copy JAR to target server or run spring-boot:run)
• At runtime:
• HTTP Client → Spring Boot Controller (InfoController) → returns SystemInfo DTO.
• Configuration (application.yml) feeds into Spring Boot at startup.
Architectural Patterns and Principles
• Layered MVC (Controller layer maps HTTP → domain models).
• Externalized configuration (via Spring’s application.yml).
• CI/CD pipeline enforces Build → Test → Deploy.
• Single‐responsibility: one controller, one model class.