Skip to content

Chore/40 catalog cicd prometheus - cd - #44

Merged
ji-circle merged 10 commits into
devfrom
chore/40-catalog-cicd-prometheus
May 18, 2026
Merged

ji-circle merged 10 commits into
devfrom
chore/40-catalog-cicd-prometheus

Conversation

@ji-circle

@ji-circle ji-circle commented May 18, 2026

Copy link
Copy Markdown
Contributor

📝 작업 내용

이번 PR에서 작업한 내용을 설명해주세요.

  • cd

🚀 주요 변경 사항

완료한 이슈 번호
Close #
관련된 이슈 번호 (닫고 싶지 않은 경우)
Related to #

✅ 자체 체크리스트 (필수)

📸 테스트 인증샷

빌드 결과 및 IntelliJ HTTP Client 실행 화면을 여기에 첨부해 주세요.

💬 리뷰어 전달사항 (선택)

특별히 봐주었으면 하는 부분이나 논의가 필요한 점을 적어주세요.



📎 참고 자료

관련 문서, 레퍼런스 링크 등이 있다면 여기에 첨부해주세요.

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 프로덕션 환경으로의 자동 배포 워크플로우 추가. CI 완료 후 또는 수동으로 배포 가능합니다.
  • Chores

    • CI 검증 범위를 개발 브랜치로 확장했습니다.
    • 헬스체크 및 모니터링 엔드포인트에 대한 무인증 접근을 허용했습니다.

Review Change Stack

@ji-circle ji-circle added this to the 8. 기타 milestone May 18, 2026
@ji-circle ji-circle added the enhancement New feature or request label May 18, 2026
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
📝 Walkthrough

워크스루

세 가지 독립적인 변경사항이 결합되어 프로덕션 배포 인프라를 구성한다: CI 워크플로우를 dev 브랜치로 확장, 새로운 프로덕션 배포 워크플로우 추가(AWS ECS에 이미지 배포), 헬스 체크 및 프로메테우스 모니터링 엔드포인트에 대한 무인증 접근 허용.

변경사항

프로덕션 배포 파이프라인

Layer / File(s) 요약
워크플로우 트리거 및 모니터링 사전 조건
.github/workflows/ci-prod.yml, .github/workflows/cd-prod.yml, src/main/java/com/michelet/catalog/infrastructure/config/SecurityConfig.java
CI-PROD 트리거가 main 및 dev 브랜치를 포함하도록 확장되며, CD-PROD 워크플로우는 CI 성공 또는 수동 dispatch 시 실행되는 job 조건과 concurrency 설정을 정의한다. SecurityConfig에서 /actuator/health/actuator/prometheus에 대한 무인증 접근이 허용되어 배포 중 모니터링이 가능해진다.
AWS 인증 및 이미지 태그 결정
.github/workflows/cd-prod.yml
AWS OIDC를 통한 역할 assume, 커밋 SHA의 처음 7자리로 이미지 태그 추출, ECR 리포지토리에서 해당 이미지 존재 여부 검증.
태스크 정의 조회 및 환경변수 주입
.github/workflows/cd-prod.yml
현재 ECS 태스크 정의를 조회해 로컬에 저장하고, jq를 통해 컨테이너 이미지, 프로파일, 포트/호스트/데이터베이스/Redis/Kafka/Eureka 관련 값, JWT 시크릿 및 만료값, 타임존 등의 환경변수를 주입하며 등록에 불필요한 메타데이터 필드를 제거한다.
태스크 정의 등록 및 배포 실행
.github/workflows/cd-prod.yml
새 태스크 정의 리비전을 ECS에 등록하고 서비스를 업데이트하며 강제 재배포를 트리거한다. 배포가 안정 상태에 도달할 때까지 대기한다.

추정 코드 리뷰 난이도

🎯 3 (보통) | ⏱️ ~25분

관련 가능성 있는 PR

  • Miche-Let/catalog-service#41: CI-PROD 워크플로우의 pull_request 대상 브랜치를 main에서 main, dev로 확장한 변경이 동일 파일에서 직접 연관된다.
  • Miche-Let/catalog-service#43: 동일한 CI 트리거 확장(dev 브랜치 포함)과 동일한 보안 규칙(actuator 엔드포인트에 permitAll) 변경이 직접 관련된다.

제안 리뷰어

  • githyj-jang
  • jihxonx
  • Jinyoung-Kim96
  • qldo
  • Sehi55

🐰 본번 배포 워크플로우, 탄탄하게 구성됐네
AWS 자격증명, 이미지 검증에 환경설정까지
헬스 체크도 무인증으로 열어두고
ECS 서비스 안정까지 우아하게 대기하니
프로덕션 배포가 한결 수월하겠구나! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive PR 제목 'Chore/40 catalog cicd prometheus - cd'는 변경사항의 여러 측면(CI/CD 워크플로우, Prometheus/actuator 설정, CD 배포)을 포함하지만 주요 변경사항인 프로덕션 배포 자동화를 명확하게 요약하지 못함. 제목을 'Add production CD pipeline to ECS' 또는 'Setup automated production deployment workflow' 같이 더 명확하고 구체적으로 변경하여 PR의 주요 목적(프로덕션 배포 자동화)을 명확히 표현하는 것을 권장합니다.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/40-catalog-cicd-prometheus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/cd-prod.yml:
- Around line 88-91: The workflow is injecting sensitive values as plain
environment variables (JWT_SECRET, INTERNAL_AUTH_SECRET, PERSONAL_INFO_SECRET)
which embeds them in the ECS task definition; instead, change the CD pipeline to
stop passing these via --arg/ENV and use ECS secrets integration with AWS
Secrets Manager or SSM Parameter Store: store each secret in Secrets
Manager/SSM, update the task definition JSON to remove those env entries and add
a "secrets" block that maps "JWT_SECRET", "INTERNAL_AUTH_SECRET",
"PERSONAL_INFO_SECRET" to their respective valueFrom ARNs/parameter ARNs, and
update the workflow step that builds the task definition to reference those ARNs
(do not interpolate the secret values into the file or call jq --arg with the
secret value).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b9a72de-48c8-430d-9d79-ecf43da505a6

📥 Commits

Reviewing files that changed from the base of the PR and between e1a9163 and 2c1d6ad.

📒 Files selected for processing (3)
  • .github/workflows/cd-prod.yml
  • .github/workflows/ci-prod.yml
  • src/main/java/com/michelet/catalog/infrastructure/config/SecurityConfig.java

Comment thread .github/workflows/cd-prod.yml

@githyj-jang githyj-jang left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다!

@ji-circle
ji-circle merged commit 77bb6ac into dev May 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants