Skip to content

Commit

Permalink
A 롤백 실패 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjoon committed Sep 19, 2024
1 parent bc97f25 commit d9520af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/backend_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
healthCheckA:
name: 🙏 Server A Health Check
needs: deployToA
if: success()
continue-on-error: true
defaults:
run:
working-directory: backend
Expand All @@ -98,7 +98,7 @@ jobs:
rollBackA:
name: 🚀 Server A RollBack
needs: [healthCheckA, findPreviousImageVersion]
if: failure()
if: ${{needs.healthCheckA.result == 'failure'}}
runs-on: [ self-hosted, devel-up-prod-a ]
defaults:
run:
Expand All @@ -122,7 +122,7 @@ jobs:
healthCheckAAfterRollBack:
name: 🙏 Server A Health Check After RollBack
needs: rollBackA
if : ${{needs.rollBackA.result == 'success'}}
continue-on-error: true
defaults:
run:
working-directory: backend
Expand All @@ -134,7 +134,7 @@ jobs:
deployToB:
name: 🚀 Server B Deployment
needs: healthCheckA
if: success()
if: ${{needs.healthCheckA.result == 'success'}}
runs-on: [ self-hosted, devel-up-prod-b ]
defaults:
run:
Expand All @@ -158,7 +158,7 @@ jobs:
healthCheckB:
name: 🙏 Server B Health Check
needs: deployToB
if: success()
continue-on-error: true
defaults:
run:
working-directory: backend
Expand Down
2 changes: 2 additions & 0 deletions backend/src/main/java/develup/api/HealthApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class HealthApi {

@GetMapping("/health")
public ResponseEntity<ApiResponse<String>> health() {


return ResponseEntity.status(400).body(new ApiResponse<>("up"));
}
}

0 comments on commit d9520af

Please sign in to comment.