-
Notifications
You must be signed in to change notification settings - Fork 1
[CHORE] 정상 배포 확인을 위한 헬스 체크 기능 구현 #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
141e024
chore: 헬스 체크 스크립트 추가
leegwichan 826b80e
chore: CD 워크플로우 추가
leegwichan baa0d78
chore: 알림 내용 추가
leegwichan 6f86572
chore: CD 스크립트 수동 실행 가능하도록 설정
leegwichan 000926c
chore: 알림 내용 변경
leegwichan 90a1b95
chore: 헬스 체크 스크립트 변경
leegwichan 808a90a
chore: CD 스크립트 변경
leegwichan c77c822
chore: CD 스크립트 변경 - 2
leegwichan c1d55b4
fix: 아키펙트 이름 수정
leegwichan 081c870
chore: CD 스크립트 변경
coli-geonwoo 37b2f69
chore: CD 스크립트 변경
coli-geonwoo 616cbf2
chore: CD 스크립트 원상복귀
coli-geonwoo 5f6d276
chore: 다른 브랜치에서도 워크 플로우를 실행할 수 있도록 수정
leegwichan c0a5579
chore: 워크플로우 개선
leegwichan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash | ||
|
|
||
| # 최대 반복 횟수 | ||
| MAX_RETRIES=60 | ||
|
|
||
| # 성공 상태 코드와 요청 URL | ||
| SUCCESS_STATUS=200 | ||
| HEALTH_CHECK_URL="http://localhost:8083/monitoring/health" | ||
|
|
||
| # 반복 시작 | ||
| i=1 | ||
| while [ "$i" -le "$MAX_RETRIES" ]; do | ||
| # HTTP 요청 보내기 | ||
| RESPONSE_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$HEALTH_CHECK_URL") | ||
| echo "[TRY $i] StatusCode : $RESPONSE_STATUS " | ||
| # 상태 코드 확인 | ||
| if [ "$RESPONSE_STATUS" -eq "$SUCCESS_STATUS" ]; then | ||
| echo "Success: Received $SUCCESS_STATUS status code on attempt $i." | ||
| exit 0 | ||
| fi | ||
|
|
||
| # 2초 대기 | ||
| sleep 2 | ||
|
|
||
| # 반복 변수 증가 | ||
| i=$((i + 1)) | ||
| done | ||
|
|
||
| # 실패 메시지 | ||
| echo "Failure: Did not receive $SUCCESS_STATUS status code within $MAX_RETRIES attempts." | ||
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash | ||
|
|
||
| # 최대 반복 횟수 | ||
| MAX_RETRIES=60 | ||
|
|
||
| # 성공 상태 코드와 요청 URL | ||
| SUCCESS_STATUS=200 | ||
| HEALTH_CHECK_URL="http://localhost:8083/monitoring/health" | ||
|
|
||
| # 반복 시작 | ||
| i=1 | ||
| while [ "$i" -le "$MAX_RETRIES" ]; do | ||
| # HTTP 요청 보내기 | ||
| RESPONSE_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$HEALTH_CHECK_URL") | ||
| echo "[TRY $i] StatusCode : $RESPONSE_STATUS " | ||
| # 상태 코드 확인 | ||
| if [ "$RESPONSE_STATUS" -eq "$SUCCESS_STATUS" ]; then | ||
| echo "Success: Received $SUCCESS_STATUS status code on attempt $i." | ||
| exit 0 | ||
| fi | ||
|
|
||
| # 2초 대기 | ||
| sleep 2 | ||
|
|
||
| # 반복 변수 증가 | ||
| i=$((i + 1)) | ||
| done | ||
|
|
||
| # 실패 메시지 | ||
| echo "Failure: Did not receive $SUCCESS_STATUS status code within $MAX_RETRIES attempts." | ||
| exit 1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
헬스 체크 단계 구현 승인
배포 후 헬스 체크를 수행하는 단계가 적절히 추가되었습니다. 이는 배포가 정상적으로 완료되었는지 확인하는 중요한 기능입니다.
헬스 체크 스크립트가 실제로 존재하고 실행 가능한지 확인해주세요:
🏁 Script executed:
Length of output: 925
워크플로우 경로 불일치 확인 및 수정 필요
scripts/dev/health-check.sh파일이 존재하고 내용도 적절함을 확인했습니다..github/workflows/Dev_CD.yml75–76행에서는~/app/scripts/health-check.sh경로를 사용하고 있어, 실행 환경에서 스크립트를 찾지 못할 가능성이 높습니다.sh 스크립트경로방식으로 호출할 경우 실행 권한(x) 플래그는 필요 없으므로 권한 문제는 없습니다.수정 예시:
또는 스크립트를
app/scripts/health-check.sh로 이동 후 기존 경로를 유지해주세요.📝 Committable suggestion
🤖 Prompt for AI Agents