Skip to content
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

[DEPLOY] develop <- main 배포 변경사항 반영 #141

Merged
merged 22 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
513877f
Merge pull request #129 from UMC5th-bias/develop
JungYoonShin Aug 25, 2024
33f1e3d
Merge pull request #130 from UMC5th-bias/develop
JungYoonShin Aug 26, 2024
530aae0
[DEPLOY #124] healthCheckController 수정
JungYoonShin Aug 26, 2024
d2adb71
[DEPLOY #124] healthCheckController 수정
JungYoonShin Aug 26, 2024
8801d60
[DEPLOY #124] healthCheckController 수정
JungYoonShin Aug 26, 2024
abe584d
[DEPLOY #124] healthCheckController 수정
JungYoonShin Aug 26, 2024
3c64d5b
[DEPLOY #124] healthCheckController 수정
JungYoonShin Aug 26, 2024
603c832
[DEPLOY #124] healthCheckController 수정
JungYoonShin Aug 26, 2024
0e03f5b
Merge pull request #132 from UMC5th-bias/develop
JungYoonShin Aug 26, 2024
5620f14
.
JungYoonShin Aug 26, 2024
e5723fa
.
JungYoonShin Aug 26, 2024
6f403eb
[CHORE] PilgrimageSocketController 주석 처리 해제
JungYoonShin Aug 30, 2024
0983701
Merge pull request #136 from UMC5th-bias/develop
JungYoonShin Aug 30, 2024
965062e
Merge pull request #139 from UMC5th-bias/develop
JungYoonShin Aug 30, 2024
7536f7c
[DEPLOY] 무중단 배포 적용
JungYoonShin Aug 30, 2024
092e922
Merge branch 'main' of https://github.com/UMC5th-bias/Server
JungYoonShin Aug 30, 2024
1f0c287
[DEPLOY] appsepc.yml 수정
JungYoonShin Aug 30, 2024
692e8fe
[DEPLOY] main.yml 수정
JungYoonShin Aug 30, 2024
8a08146
[DEPLOY] main.yml 수정
JungYoonShin Aug 30, 2024
8b821ae
[DEPLOY] main.yml 수정
JungYoonShin Aug 31, 2024
8f521e6
[DEPLOY] appsepc.yml 수정
JungYoonShin Aug 31, 2024
396641d
[DEPLOY] appsepc.yml 수정
JungYoonShin Aug 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ jobs:
uses: actions/checkout@v3

# (2) JDK 11 세팅
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

# (3) Gradle build (Test 제외)
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build with Gradle
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
Expand Down Expand Up @@ -64,4 +67,5 @@ jobs:
--application-name ${{ env.CODE_DEPLOY_APPLICATION_NAME }} \
--deployment-config-name CodeDeployDefault.AllAtOnce \
--deployment-group-name ${{ env.CODE_DEPLOY_DEPLOYMENT_GROUP_NAME }} \
--s3-location bucket=$S3_BUCKET_NAME,key=$GITHUB_SHA.zip,bundleType=zip
--s3-location bucket=$S3_BUCKET_NAME,key=$GITHUB_SHA.zip,bundleType=zip \
--file-exists-behavior OVERWRITE
26 changes: 17 additions & 9 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,21 @@ permissions:
group: ubuntu

hooks:
ApplicationStart:
- location: scripts/run_new_was.sh
timeout: 180
runas: ubuntu
- location: scripts/health_check.sh
timeout: 180
runas: ubuntu
- location: scripts/switch.sh
timeout: 180
# ApplicationStart:
# - location: scripts/run_new_was.sh
# timeout: 180
# runas: ubuntu
# - location: scripts/health_check.sh
# timeout: 180
# runas: ubuntu
# - location: scripts/switch.sh
# timeout: 180
# runas: ubuntu
AfterInstall:
- location: scripts/stop.sh
timeout: 60
runas: ubuntu
ApplicationStart:
- location: scripts/start.sh
timeout: 60
runas: ubuntu
2 changes: 1 addition & 1 deletion scripts/health_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo "> Start health check of WAS at 'http://127.0.0.1:${TARGET_PORT}' ..."
for RETRY_COUNT in 1 2 3 4 5 6 7 8 9 10
do
echo "> #${RETRY_COUNT} trying..."
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:${TARGET_PORT}/health)
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:${TARGET_PORT}/hello)

if [ ${RESPONSE_CODE} -eq 200 ]; then
echo "> New WAS successfully running"
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/favoriteplace/HelloController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.favoriteplace;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

@GetMapping("/hello")
public String hello(){
return "hello success!";
}

}
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.favoriteplace.app.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/health")
public class HealthCheckController {

@GetMapping("/health")
@GetMapping()
public String health(){
return "hello success!";
}
Expand Down
Loading