Skip to content

Commit a7cf83f

Browse files
authoredJul 30, 2024
#26 - 투표함을 생성한다. (#55)
* refactor: 예외처리 추가 * refactor: 초기 상태의 Ballots 추가 * feature: id 이외의 Vote 식별자 추가 * refactor: VoteIdentifier 적용 및 테스트 추가 * feature: Created Vote Event 추가 * feature: CreatedVoteService 추가 * feature: Vote Scheduling 적용 * feature: AuthService에 Event적용 * test: 문구 테스트 * chore: build-and-upload로 job명 변경 * refactor: user를 찾을 때 발생할 수 있는 예외를 차단한다. * chore: 예외 사항으로 인한, 서버 중단으로 인해 무중단 배포를 구현한다. * chore: pullrequest template 수정 * feat: VoteOptionsByVoteDateJpaEntity 추가 (오늘의 선택지 저장) * refactor: 오늘의 질문지 적용 * refactor: 테스트 수정 * refactor: VoteOptionsByVoteDate가 Vote에 포함되도록 수정 * test: Fixture 추가 * refactor: naming 변경 * test: 추가한 로직들에 대한 테스트 추가 * chore: 사용하지 않는 import 제거 * fix: VoteTest 수정 * test: 터지는 테스트 디버깅 추가 * test: Fixture.create시... id값 0으로 지정... * test: Date 검증 제거 * chore: log 추가 * chore: h2 log 제거 * chore: 실패한 테스트 Stack Trace 나올 수 있도록 수정 * test: Github 환경에서 Date가 저장되면, 반올림되는 상황에 대처해서 Test 수정 * chore: 주석 추가 * test: 테스트 리팩토링
1 parent 7eea9ba commit a7cf83f

File tree

58 files changed

+1381
-560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1381
-560
lines changed
 

‎.github/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
## 5. ✅ 배포 Checklist
1212
<!-- 확인이 된 부분에 모두 [x]로 변경하여 확인했다는 사실을 알려주세요. -->
1313

14-
- [ ] SecretKey 를 업데이트 해주세요
1514
- [ ] 본인을 Assign 해주세요.
1615
- [ ] 본인을 제외한 백엔드 개발자를 리뷰어로 지정해주세요.
16+
- [ ] 변경된 DB 업데이트 해주세요. (꼭 해주세요 배포 안돼요!!!)

‎.github/workflows/wespot-cd.yml

+4-13
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
types: [ closed ]
1010

1111
jobs:
12-
build:
12+
build-and-deploy:
1313
runs-on: ubuntu-latest
1414

1515
steps:
@@ -29,7 +29,7 @@ jobs:
2929
run: chmod +x gradlew
3030

3131
- name: Build with Gradle
32-
run: ./gradlew app:build
32+
run: ./gradlew app:build --stacktrace
3333

3434
- name: Docker buildx 설치
3535
uses: docker/setup-buildx-action@v2.9.1
@@ -43,24 +43,15 @@ jobs:
4343
- name: Docker Image Build
4444
run: docker buildx build --platform linux/amd64 -t wespot0817/wespot . --push
4545

46-
- name: Docker Pull And run
46+
- name: Zero Down Time Deploy Start
4747
uses: appleboy/ssh-action@v0.1.6
4848
with:
4949
host: ${{ secrets.WAS_HOST }}
5050
username: ${{ secrets.WAS_USERNAME }}
5151
key: ${{ secrets.WAS_SSH_KEY }}
5252
port: ${{ secrets.WAS_SSH_PORT }}
5353
script: |
54-
set -e
55-
docker stop backend || true
56-
docker rm backend || true
57-
docker container prune -f
58-
docker image prune -a -f
59-
docker network prune -f
60-
docker volume prune -f
61-
docker builder prune -f
62-
docker pull wespot0817/wespot
63-
docker run --add-host host.docker.internal:host-gateway -d -p 8080:8080 --name backend --platform linux/amd64 wespot0817/wespot
54+
sudo sh zero-down-time.sh
6455
6556
- name: Send Success Message
6657
if: ${{ success() }}

0 commit comments

Comments
 (0)
Please sign in to comment.