From 141e0244eeeab7976657d530e9f590840cdb6331 Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 16:01:19 +0900 Subject: [PATCH 01/14] =?UTF-8?q?chore:=20=ED=97=AC=EC=8A=A4=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/dev/health-check.sh | 31 +++++++++++++++++++++++++++++++ scripts/prod/health-check.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 scripts/dev/health-check.sh create mode 100644 scripts/prod/health-check.sh diff --git a/scripts/dev/health-check.sh b/scripts/dev/health-check.sh new file mode 100644 index 00000000..1c576bd7 --- /dev/null +++ b/scripts/dev/health-check.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# 최대 반복 횟수 +MAX_RETRIES=0 # TODO : 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 + + # 1초 대기 + sleep 1 + + # 반복 변수 증가 + i=$((i + 1)) +done + +# 실패 메시지 +echo "Failure: Did not receive $SUCCESS_STATUS status code within $MAX_RETRIES attempts." +exit 1 diff --git a/scripts/prod/health-check.sh b/scripts/prod/health-check.sh new file mode 100644 index 00000000..9292c600 --- /dev/null +++ b/scripts/prod/health-check.sh @@ -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 + + # 1초 대기 + sleep 1 + + # 반복 변수 증가 + i=$((i + 1)) +done + +# 실패 메시지 +echo "Failure: Did not receive $SUCCESS_STATUS status code within $MAX_RETRIES attempts." +exit 1 From 826b80e2d3823543571b08dbd7c518ba05d4470f Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 16:02:22 +0900 Subject: [PATCH 02/14] =?UTF-8?q?chore:=20CD=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 헬스 체크 기능 추가 - 배포 실패 시, 알림 기능 추가 --- .github/workflows/Dev_CD.yml | 11 +++++++++++ .github/workflows/Prod_CD.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index 8718cc23..cd13f18c 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -70,3 +70,14 @@ jobs: - name: Replace application to latest run: sudo sh ~/app/scripts/replace-new-version.sh + + - name: Health Check + run: sudo sh ~/app/scripts/health-check.sh + + - name: Send Discord Alert on Failure + if: failure() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d "{\"content\":\":x: DEV 배포 실패! 확인이 필요합니다.\"}" \ + ${{ secrets.DISCORD_WEB_HOOK }} diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index 20e0c517..891bc5bb 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -70,3 +70,14 @@ jobs: - name: Replace application to latest run: sudo sh ~/app/scripts/replace-new-version.sh + + - name: Health Check + run: sudo sh ~/app/scripts/health-check.sh + + - name: Send Discord Alert on Failure + if: failure() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d "{\"content\":\":x: PROD 배포 실패! 확인이 필요합니다.\"}" \ + ${{ secrets.DISCORD_WEB_HOOK }} From baa0d786cdcb0a92edf83e966bcbab61b09e7c4d Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 16:05:52 +0900 Subject: [PATCH 03/14] =?UTF-8?q?chore:=20=EC=95=8C=EB=A6=BC=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 2 +- .github/workflows/Prod_CD.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index cd13f18c..b16040fb 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -79,5 +79,5 @@ jobs: run: | curl -H "Content-Type: application/json" \ -X POST \ - -d "{\"content\":\":x: DEV 배포 실패! 확인이 필요합니다.\"}" \ + -d "{\"content\":\":x: DEV 배포 실패! 확인이 필요합니다.\nJob: ${{ github.job }}\"}" \ ${{ secrets.DISCORD_WEB_HOOK }} diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index 891bc5bb..12cb2c4c 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -79,5 +79,5 @@ jobs: run: | curl -H "Content-Type: application/json" \ -X POST \ - -d "{\"content\":\":x: PROD 배포 실패! 확인이 필요합니다.\"}" \ + -d "{\"content\":\":x: PROD 배포 실패! 확인이 필요합니다.\nJob: ${{ github.job }}\"}" \ ${{ secrets.DISCORD_WEB_HOOK }} From 6f8657225dd01ea5826f707ff4d98ff2b105ea20 Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 16:08:57 +0900 Subject: [PATCH 04/14] =?UTF-8?q?chore:=20CD=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EB=8F=99=20=EC=8B=A4=ED=96=89=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 1 + .github/workflows/Prod_CD.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index b16040fb..75a54dd5 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -1,6 +1,7 @@ name: dev-cd on: + workflow_dispatch: push: branches: - "develop" diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index 12cb2c4c..6c5f3e67 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -1,6 +1,7 @@ name: prod-cd on: + workflow_dispatch: push: branches: - "main" From 000926ca3b41d6de7ae07708abe8048300a75840 Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 16:21:18 +0900 Subject: [PATCH 05/14] =?UTF-8?q?chore:=20=EC=95=8C=EB=A6=BC=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 4 ++-- .github/workflows/Prod_CD.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index 75a54dd5..d5d25454 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -73,12 +73,12 @@ jobs: run: sudo sh ~/app/scripts/replace-new-version.sh - name: Health Check - run: sudo sh ~/app/scripts/health-check.sh + run: sh ~/app/scripts/health-check.sh - name: Send Discord Alert on Failure if: failure() run: | curl -H "Content-Type: application/json" \ -X POST \ - -d "{\"content\":\":x: DEV 배포 실패! 확인이 필요합니다.\nJob: ${{ github.job }}\"}" \ + -d "{\"content\":\":x: DEV 배포 실패! 확인이 필요합니다.\n링크: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \ ${{ secrets.DISCORD_WEB_HOOK }} diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index 6c5f3e67..ca322ea5 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -73,12 +73,12 @@ jobs: run: sudo sh ~/app/scripts/replace-new-version.sh - name: Health Check - run: sudo sh ~/app/scripts/health-check.sh + run: sh ~/app/scripts/health-check.sh - name: Send Discord Alert on Failure if: failure() run: | curl -H "Content-Type: application/json" \ -X POST \ - -d "{\"content\":\":x: PROD 배포 실패! 확인이 필요합니다.\nJob: ${{ github.job }}\"}" \ + -d "{\"content\":\":x: PROD 배포 실패! 확인이 필요합니다.\n링크: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \ ${{ secrets.DISCORD_WEB_HOOK }} From 90a1b9502fcdb35d2eda02b84e4cd3d6160a78a8 Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 16:45:04 +0900 Subject: [PATCH 06/14] =?UTF-8?q?chore:=20=ED=97=AC=EC=8A=A4=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/dev/health-check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev/health-check.sh b/scripts/dev/health-check.sh index 1c576bd7..9292c600 100644 --- a/scripts/dev/health-check.sh +++ b/scripts/dev/health-check.sh @@ -1,7 +1,7 @@ #!/bin/bash # 최대 반복 횟수 -MAX_RETRIES=0 # TODO : 60으로 수정 +MAX_RETRIES=60 # 성공 상태 코드와 요청 URL SUCCESS_STATUS=200 From 808a90a9b120effb2a4cd3423e478cd408b69cf0 Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 17:03:12 +0900 Subject: [PATCH 07/14] =?UTF-8?q?chore:=20CD=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 4 ++-- .github/workflows/Prod_CD.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index d5d25454..6cf9ff08 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -49,7 +49,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: deploy-scripts - path: ./scripts/dev/ + path: ./scripts/dev/* if-no-files-found: error deploy: @@ -80,5 +80,5 @@ jobs: run: | curl -H "Content-Type: application/json" \ -X POST \ - -d "{\"content\":\":x: DEV 배포 실패! 확인이 필요합니다.\n링크: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \ + -d "{\"content\":\":x: [DEV] 배포 실패! 확인이 필요합니다.\n링크: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \ ${{ secrets.DISCORD_WEB_HOOK }} diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index ca322ea5..e3dc7403 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -49,7 +49,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: deploy-scripts - path: ./scripts/prod/ + path: ./scripts/prod/* if-no-files-found: error deploy: @@ -80,5 +80,5 @@ jobs: run: | curl -H "Content-Type: application/json" \ -X POST \ - -d "{\"content\":\":x: PROD 배포 실패! 확인이 필요합니다.\n링크: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \ + -d "{\"content\":\":warning: :warning: [PROD] 배포 실패! :warning: :warning: \n링크: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \ ${{ secrets.DISCORD_WEB_HOOK }} From c77c822d1bc4fadedb77fe5d9534ca99287b7a41 Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 17:07:37 +0900 Subject: [PATCH 08/14] =?UTF-8?q?chore:=20CD=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EB=B3=80=EA=B2=BD=20-=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 2 +- .github/workflows/Prod_CD.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index 6cf9ff08..dfab2c5d 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -48,7 +48,7 @@ jobs: - name: Upload deploy scripts uses: actions/upload-artifact@v4 with: - name: deploy-scripts + name: dev-deploy-scripts path: ./scripts/dev/* if-no-files-found: error diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index e3dc7403..225d8c65 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -48,7 +48,7 @@ jobs: - name: Upload deploy scripts uses: actions/upload-artifact@v4 with: - name: deploy-scripts + name: prod-deploy-scripts path: ./scripts/prod/* if-no-files-found: error From c1d55b429d45056f55b22546de3b8c9a24a60bfa Mon Sep 17 00:00:00 2001 From: leegwichan Date: Wed, 30 Jul 2025 19:09:12 +0900 Subject: [PATCH 09/14] =?UTF-8?q?fix:=20=EC=95=84=ED=82=A4=ED=8E=99?= =?UTF-8?q?=ED=8A=B8=20=EC=9D=B4=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 2 +- .github/workflows/Prod_CD.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index dfab2c5d..6cf9ff08 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -48,7 +48,7 @@ jobs: - name: Upload deploy scripts uses: actions/upload-artifact@v4 with: - name: dev-deploy-scripts + name: deploy-scripts path: ./scripts/dev/* if-no-files-found: error diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index 225d8c65..e3dc7403 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -48,7 +48,7 @@ jobs: - name: Upload deploy scripts uses: actions/upload-artifact@v4 with: - name: prod-deploy-scripts + name: deploy-scripts path: ./scripts/prod/* if-no-files-found: error From 081c8700066b6c1cdc83fc8c6e5eaf0af4e18e4f Mon Sep 17 00:00:00 2001 From: coli Date: Wed, 30 Jul 2025 19:23:45 +0900 Subject: [PATCH 10/14] =?UTF-8?q?chore:=20CD=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index 6cf9ff08..81d3f887 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -5,6 +5,7 @@ on: push: branches: - "develop" + - "chore/#210" jobs: build: @@ -49,7 +50,14 @@ jobs: uses: actions/upload-artifact@v4 with: name: deploy-scripts - path: ./scripts/dev/* + path: ./scripts/dev/replace-new-version.sh + if-no-files-found: error + + - name: Upload health check scripts + uses: actions/upload-artifact@v4 + with: + name: health-check-scripts + path: ./scripts/dev/health-check.sh if-no-files-found: error deploy: @@ -69,6 +77,12 @@ jobs: name: deploy-scripts path: ~/app/scripts + - name: Download deploy scripts + uses: actions/download-artifact@v4 + with: + name: health-check-scripts + path: ~/app/scripts + - name: Replace application to latest run: sudo sh ~/app/scripts/replace-new-version.sh From 37b2f69a03d5dd02421890c59731dda1a61cc5e5 Mon Sep 17 00:00:00 2001 From: coli Date: Wed, 30 Jul 2025 19:29:56 +0900 Subject: [PATCH 11/14] =?UTF-8?q?chore:=20CD=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index 81d3f887..f1564e5c 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -14,8 +14,8 @@ jobs: steps: - name: Checkout Develop Branch uses: actions/checkout@v4 - with: - ref: "develop" + # with: + # ref: "develop" - name: Setting dev-secret.yml run: | From 616cbf250fc35e20e499ebb6a2e94bc6dbdcd785 Mon Sep 17 00:00:00 2001 From: coli Date: Wed, 30 Jul 2025 19:37:33 +0900 Subject: [PATCH 12/14] =?UTF-8?q?chore:=20CD=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=9B=90=EC=83=81=EB=B3=B5=EA=B7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index f1564e5c..f9a93a8f 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -5,7 +5,6 @@ on: push: branches: - "develop" - - "chore/#210" jobs: build: @@ -14,8 +13,8 @@ jobs: steps: - name: Checkout Develop Branch uses: actions/checkout@v4 - # with: - # ref: "develop" + with: + ref: "develop" - name: Setting dev-secret.yml run: | @@ -77,7 +76,7 @@ jobs: name: deploy-scripts path: ~/app/scripts - - name: Download deploy scripts + - name: Download health check scripts uses: actions/download-artifact@v4 with: name: health-check-scripts From 5f6d2768db5b1ed4a7a06738b63b269676ab65e2 Mon Sep 17 00:00:00 2001 From: leegwichan Date: Thu, 31 Jul 2025 10:39:53 +0900 Subject: [PATCH 13/14] =?UTF-8?q?chore:=20=EB=8B=A4=EB=A5=B8=20=EB=B8=8C?= =?UTF-8?q?=EB=9E=9C=EC=B9=98=EC=97=90=EC=84=9C=EB=8F=84=20=EC=9B=8C?= =?UTF-8?q?=ED=81=AC=20=ED=94=8C=EB=A1=9C=EC=9A=B0=EB=A5=BC=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 4 +--- .github/workflows/Prod_CD.yml | 2 -- scripts/dev/health-check.sh | 4 ++-- scripts/prod/health-check.sh | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index f9a93a8f..ed828dea 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -11,10 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout Develop Branch + - name: Checkout Branch uses: actions/checkout@v4 - with: - ref: "develop" - name: Setting dev-secret.yml run: | diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index e3dc7403..5f5a6114 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -13,8 +13,6 @@ jobs: steps: - name: Checkout Develop Branch uses: actions/checkout@v4 - with: - ref: "main" - name: Setting prod-secret.yml run: | diff --git a/scripts/dev/health-check.sh b/scripts/dev/health-check.sh index 9292c600..96fd66fc 100644 --- a/scripts/dev/health-check.sh +++ b/scripts/dev/health-check.sh @@ -19,8 +19,8 @@ while [ "$i" -le "$MAX_RETRIES" ]; do exit 0 fi - # 1초 대기 - sleep 1 + # 2초 대기 + sleep 2 # 반복 변수 증가 i=$((i + 1)) diff --git a/scripts/prod/health-check.sh b/scripts/prod/health-check.sh index 9292c600..96fd66fc 100644 --- a/scripts/prod/health-check.sh +++ b/scripts/prod/health-check.sh @@ -19,8 +19,8 @@ while [ "$i" -le "$MAX_RETRIES" ]; do exit 0 fi - # 1초 대기 - sleep 1 + # 2초 대기 + sleep 2 # 반복 변수 증가 i=$((i + 1)) From c0a5579fbe08510ecfa06935171a3258ce3b33aa Mon Sep 17 00:00:00 2001 From: leegwichan Date: Thu, 31 Jul 2025 10:50:06 +0900 Subject: [PATCH 14/14] =?UTF-8?q?chore:=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Dev_CD.yml | 17 ++--------------- .github/workflows/Prod_CD.yml | 4 ++-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/Dev_CD.yml b/.github/workflows/Dev_CD.yml index ed828dea..e9a4e830 100644 --- a/.github/workflows/Dev_CD.yml +++ b/.github/workflows/Dev_CD.yml @@ -47,14 +47,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: deploy-scripts - path: ./scripts/dev/replace-new-version.sh - if-no-files-found: error - - - name: Upload health check scripts - uses: actions/upload-artifact@v4 - with: - name: health-check-scripts - path: ./scripts/dev/health-check.sh + path: ./scripts/dev/ if-no-files-found: error deploy: @@ -72,13 +65,7 @@ jobs: uses: actions/download-artifact@v4 with: name: deploy-scripts - path: ~/app/scripts - - - name: Download health check scripts - uses: actions/download-artifact@v4 - with: - name: health-check-scripts - path: ~/app/scripts + path: ~/app/scripts/ - name: Replace application to latest run: sudo sh ~/app/scripts/replace-new-version.sh diff --git a/.github/workflows/Prod_CD.yml b/.github/workflows/Prod_CD.yml index 5f5a6114..cb10ee58 100644 --- a/.github/workflows/Prod_CD.yml +++ b/.github/workflows/Prod_CD.yml @@ -47,7 +47,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: deploy-scripts - path: ./scripts/prod/* + path: ./scripts/prod/ if-no-files-found: error deploy: @@ -65,7 +65,7 @@ jobs: uses: actions/download-artifact@v4 with: name: deploy-scripts - path: ~/app/scripts + path: ~/app/scripts/ - name: Replace application to latest run: sudo sh ~/app/scripts/replace-new-version.sh