feat: prod 배포 환경 구축 (#39) - #41
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough
Changes프로덕션 배포
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Gradle
participant EC2
participant deploy.sh
GitHub Actions->>Gradle: bootJar 빌드
GitHub Actions->>EC2: JAR 파일 SCP 전송
GitHub Actions->>deploy.sh: SSH로 배포 스크립트 실행
deploy.sh->>EC2: 애플리케이션 배포
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 36-37: Update the deployment workflow around the “Build Spring
Boot jar” step and the subsequent deploy.sh execution: remove the -x test
exclusion so tests are mandatory, then add a post-deployment health-check step
that polls the application health endpoint until it succeeds or a defined
timeout is reached. Ensure timeout or unhealthy responses produce a nonzero exit
status so the workflow fails.
- Line 39: Update the “Copy jar to EC2” workflow step to avoid hardcoding the
versioned JAR path. Configure a stable Gradle bootJar archive name and reference
that name in the SCP command, or derive the actual bootJar output during the
build and pass it to this step so version changes do not break deployment.
- Line 22: 프로덕션 배포 워크플로의 actions/checkout, actions/setup-java,
appleboy/scp-action, appleboy/ssh-action 사용을 변경 가능한 버전 태그에서 해당 액션의 전체 커밋 SHA로
고정하세요. 각 uses 항목의 기존 버전 주석은 유지하고, cd-prod.yml의 네 배포 액션 참조만 수정하세요.
- Around line 11-13: Update the production workflow’s concurrency configuration
by changing cancel-in-progress from true to false, so new main pushes queue
behind the active deployment instead of cancelling it. Preserve the existing
deploy-prod concurrency group and avoid introducing concurrent deployment
behavior.
🪄 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: c071d715-f8fd-4f47-b5a0-0bb911558f01
📒 Files selected for processing (1)
.github/workflows/cd-prod.yml
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the workflow file with line numbers around the referenced ranges.
file=".github/workflows/cd-prod.yml"
wc -l "$file"
sed -n '1,140p' "$file" | cat -nRepository: SLAT-TO/SLAT-TO-BE
Length of output: 2071
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/cd-prod.yml"
wc -l "$file"
sed -n '1,140p' "$file" | cat -nRepository: SLAT-TO/SLAT-TO-BE
Length of output: 2071
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/cd-prod.yml"
wc -l "$file"
sed -n '1,140p' "$file" | cat -nRepository: SLAT-TO/SLAT-TO-BE
Length of output: 2071
프로덕션 배포 액션을 커밋 SHA로 고정하세요. .github/workflows/cd-prod.yml의 22, 27, 40, 50행에서 actions/checkout@v4, actions/setup-java@v4, appleboy/scp-action@v1, appleboy/ssh-action@v1가 변경 가능한 태그를 사용합니다. 배포 경로에서는 태그 이동만으로 동작이 바뀔 수 있으니 전체 커밋 SHA로 바꾸고 버전 주석은 유지하세요.
🤖 Prompt for 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.
In @.github/workflows/cd-prod.yml at line 22, 프로덕션 배포 워크플로의 actions/checkout,
actions/setup-java, appleboy/scp-action, appleboy/ssh-action 사용을 변경 가능한 버전 태그에서
해당 액션의 전체 커밋 SHA로 고정하세요. 각 uses 항목의 기존 버전 주석은 유지하고, cd-prod.yml의 네 배포 액션 참조만
수정하세요.
🔗 관련 이슈 (Related Issue)
Closes #39
📝 작업 내용
prod 환경 자동 배포 구성
prod 서버 인프라 구성
dev/prod 환경 분리
slatto_dev,slatto_prod로 분리운영 환경 설정 추가
✅ PR 체크리스트
Summary by CodeRabbit
main브랜치 변경 사항을 기반으로 프로덕션 환경에 자동 배포하는 기능을 추가했습니다.