TL;DR — submit 한 모듈만 고쳐도 서버 전체가 재빌드·재배포되던 단일 모듈 구조를, 책임 단위 5개 Gradle 멀티 모듈로 분리하고 CI에
paths-filter를 붙여 변경된 모듈만 배포하도록 바꿨다. 목표는 빌드 속도가 아니라 배포 범위(blast radius) 축소.
submit 코드 한 줄만 바꿔도 auth·course·gateway까지 전부 재빌드·재배포1) Gradle 멀티 모듈 분리 (common·gateway·auth·course·submit) — settings.gradle
['common', 'gateway', 'auth', 'course', 'submit'].each { name ->
include name
project(":${name}").projectDir = new File("modules/${name}")
}
git mv로 파일 이동(히스토리 유지) → 패키지/Application 분리 → SRP·모듈 의존성 정리 → 모듈별 application.properties·Dockerfile 분리 → K8s 매니페스트 → CI/CD 대응 → 빌드·테스트 검증@SpringBootApplication 자동 설정 충돌(8621d05), 전환 후 테스트 컴파일 오류(15d4f57)2) CI 선택 배포 — deploy-server.yml
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
common: ['modules/common/**', 'build.gradle', 'settings.gradle']
gateway: ['modules/gateway/**']
auth: ['modules/auth/**']
course: ['modules/course/**']
submit: ['modules/submit/**']
common·빌드 스크립트 변경 → 전체 배포(공유 코드라 영향이 전체로 번짐) / 수동 workflow_dispatch → 전부