1️⃣ CI + SonarCloud + Coverage + PR Template 자동 구성 프롬프트
You are a senior DevOps engineer.
Project context:
- Spring Boot 3.x
- Gradle Kotlin DSL
- Java 17+
- Hexagonal Architecture
- GitHub repository
- Goal: Production-grade CI pipeline
Tasks:
1. Add GitHub Actions workflow:
- Trigger on push and pull_request to main
- Run:
- ./gradlew clean build
- ./gradlew test
- Generate JaCoCo coverage report
- Upload coverage as artifact
- Fail build if test fails
2. Integrate SonarCloud:
- Add sonar plugin in build.gradle.kts
- Configure sonar.projectKey placeholder
- Use SONAR_TOKEN from GitHub Secrets
- Enforce Quality Gate
- Block PR merge if Quality Gate fails
3. Enforce minimum 70% test coverage:
- Configure JaCoCo rule
- Fail build if coverage < 0.70
4. Add Pull Request Template:
Create .github/pull_request_template.md with:
- Summary of change
- Related issue
- Domain impact (User / Order / Payment / Settlement)
- Test coverage confirmation
- Architecture impact (Domain / Application / Adapter)
- Checklist:
- [ ] Unit tests added
- [ ] Integration test added (if needed)
- [ ] No business logic in Controller
- [ ] Port/Adapter separation maintained
5. Suggest README update section:
- CI status badge
- SonarCloud badge
- Coverage badge
- Architecture summary
Generate:
- Full workflow yaml
- Gradle config
- PR template file
- Required GitHub Secret list
- Step-by-step setup guide
✅ 2️⃣ CodeRabbit 추가 프롬프트
Add AI-based pull request review using CodeRabbit.
Tasks:
1. Add CodeRabbit GitHub App configuration
2. Configure review rules:
- Detect:
- Business logic inside Controller
- Direct JPA usage inside Domain
- Missing transactional boundaries
- Missing unit tests
- Suggest refactoring for:
- Long methods (>30 lines)
- High cyclomatic complexity
- Duplicate code
3. Add configuration file if required
4. Provide setup steps
5. Provide example AI review comment
✅ 3️⃣ 커버리지 강제 설정용 JaCoCo 규칙 프롬프트
Configure JaCoCo coverage rule in Gradle Kotlin DSL.
Requirements:
- Minimum 70% instruction coverage
- Exclude:
- DTO
- Configuration classes
- Exception classes
- Fail build if rule violated
- Show example coverage report output
🎯 결과

LIST
'Spring & Backend' 카테고리의 다른 글
| JIRA의 복잡한 프로세스를 work.md 하나로 관리할 수 있을까? (0) | 2026.02.24 |
|---|---|
| SonarQube 사용법 완전 정리 (0) | 2026.02.24 |
| 낙관적 락과 비관적 락에 대해 설명해 주세요. (0) | 2026.02.24 |
| Core Web Vitals란 무엇인가요? (0) | 2026.02.24 |
| MapStruct란 무엇인가? (0) | 2026.02.23 |
