-
Notifications
You must be signed in to change notification settings - Fork 1
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
[REFACTOR] 멀티 모듈 및 SQS를 활용한 API 서버와 푸시알림 서버 분리 #92
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
4190c57
[REFACTOR] 멀티 모듈 생성 #82
ddongseop 7391292
[REFACTOR] common 모듈 분리 #82
ddongseop a4ccbbb
[REFACTOR] external 모듈 분리 #82
ddongseop 0357a5e
[REFACTOR] domain 모듈 분리 #82
jun02160 5ccdc81
Merge pull request #83 from Team-Umbba/refactor/#82-multi_module_comm…
ddongseop 16cce32
[MERGE] 병합 충돌 해결
jun02160 17814d7
[MERGE] merge conflict solve
jun02160 c9f8f82
Merge pull request #84 from Team-Umbba/refactor/#82-multi_module_domain
jun02160 d2e3f87
[REFACTOR] Notification 서버 로직 분리 #82
jun02160 4daac0d
Merge pull request #85 from Team-Umbba/refactor/#82-multi_module_noti…
jun02160 a863c51
[REFACTOR] api 모듈 분리 #82
ddongseop bdd468d
Merge remote-tracking branch 'origin/refactor/#82-multi_module' into …
ddongseop 9d4616f
[MERGE] 병합 충돌 해결
ddongseop 2c1aaf6
Merge pull request #86 from Team-Umbba/refactor/#82-multi_module_api
ddongseop 4fbe1f9
[CHORE] 디렉토리 구조 최적화 #82
jun02160 5ad7fef
[REFACTOR] import 경로 변경 문제 해결 #82
ddongseop bc931fa
[FIX] import 에러 해결 #82
jun02160 7295759
[FIX] 빌드 오류 해결 #82
ddongseop 451908d
Merge remote-tracking branch 'origin/refactor/#82-multi_module' into …
ddongseop ab1c0bc
[CHORE] 의존성 중복 제거
jun02160 7a9dba5
[DOCS] 미사용 dependency 제거 #82
ddongseop 55a71af
[FIX] import 에러 해결 #82
jun02160 e9c78ed
[DOCS] 서버 실행시 발생 오류 해결 #82
ddongseop 0326a29
[MERGE] 병합 충돌 해결
jun02160 00abc93
[FEAT] SQSConsmer, SQSProducer 추가 #87
jun02160 b0c0f08
[FEAT] Notification 서비스 API 서버에서 처리 #87
jun02160 865d05d
[CHORE] 서버 이중화를 위한 CI/CD 코드 수정 #82
ddongseop f2495ea
[FIX] EntityManager close 추가 #88
ddongseop 60b1ea3
[ADD] develop 브랜치 hotfix 수정사항 반영 #87
jun02160 fca32ea
[FEAT] SQS 대기열을 통한 푸시알림 기능 #87
jun02160 a0d1036
[CHORE] 500 에러 핸들링 주석처리 제거
jun02160 bd75121
[CHORE] 불필요한 파일 제거
jun02160 95015cf
Merge pull request #91 from Team-Umbba/feat/#87-sqs_push_notification
jun02160 43dbd94
Merge remote-tracking branch 'origin/develop' into refactor/#82-multi…
ddongseop fc828fd
[MERGE] 병합 충돌 해결
ddongseop 4c14870
[CHORE] yml 생성 경로 수정 #82
ddongseop 549320d
[CHORE] CI 스크립트 실패 해결 #82
ddongseop 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 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 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 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,114 @@ | ||
# 워크플로우의 이름 지정 | ||
name: Umbba Notification Server CD | ||
|
||
# 해당 workflow가 언제 실행될 것인지에 대한 트리거를 지정 | ||
on: | ||
push: | ||
branches: [ "develop" ] | ||
paths: | ||
- umbba-notification/** | ||
- umbba-domain/** | ||
- umbba-common/** | ||
- umbba-external/** | ||
|
||
env: | ||
S3_BUCKET_NAME: umbba-storage | ||
|
||
jobs: | ||
build: | ||
name: Code deployment | ||
|
||
# 실행 환경 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
# 1) 워크플로우 실행 전 기본적으로 체크아웃 필요 | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
# 2) JDK 11버전 설치, 다른 JDK 버전을 사용하다면 수정 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
|
||
# 3) 환경변수 파일 생성 | ||
- name: make application.yml 파일 생성 | ||
run: | | ||
# application.yml 파일 생성 | ||
cd ./umbba-notification/src/main/resources | ||
rm application.yaml | ||
|
||
touch ./application.yml | ||
|
||
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | ||
echo "${{ secrets.UMBBA_SECRET }}" >> ./application.yml | ||
|
||
# 생성된 파일 확인 | ||
cat ./application.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 여기도 !! |
||
|
||
#################################### | ||
|
||
# FCM secret key 폴더 생성 | ||
mkdir ./firebase | ||
cd ./firebase | ||
Comment on lines
+62
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 여기도! |
||
|
||
aws s3 cp --region ap-northeast-2 s3://${{ secrets.S3_BUCKET_NAME }}/json/umbba-fcm-firebase-adminsdk.json . | ||
|
||
shell: bash | ||
|
||
# 이 워크플로우는 gradle build | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle # 실제 application build(-x 옵션을 통해 test는 제외) | ||
run: ./gradlew umbba-notification:bootJar -x test | ||
|
||
# 디렉토리 생성 | ||
- name: Make Directory | ||
run: mkdir -p deploy | ||
|
||
# Jar 파일 복사 | ||
- name: Copy Jar | ||
run: cp ./umbba-notification/build/libs/*.jar ./deploy | ||
# run: cp -r src/main/* ./deploy | ||
|
||
# appspec.yml, script files 파일 복사 | ||
- name: Copy files | ||
run: cp ./scripts/umbba-notification/* ./deploy | ||
|
||
- name: Make zip file | ||
run: zip -r ./umbba-notification.zip ./deploy | ||
shell: bash | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | ||
aws-region: ap-northeast-2 | ||
|
||
- name: Upload to S3 | ||
run: aws s3 cp --region ap-northeast-2 ./umbba-notification.zip s3://$S3_BUCKET_NAME/ | ||
|
||
# Deploy | ||
- name: Deploy | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} | ||
run: | ||
aws deploy create-deployment | ||
--application-name umbba-server-codedeploy | ||
--deployment-group-name umbba-notification-server-codedeploy-group | ||
--file-exists-behavior OVERWRITE | ||
--s3-location bucket=umbba-storage,bundleType=zip,key=umbba-notification.zip | ||
--region ap-northeast-2 |
This file contains 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,76 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
|
||
name: Umbba Notification Server CI | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
paths: | ||
- umbba-notification/** | ||
- umbba-domain/** | ||
- umbba-common/** | ||
- umbba-external/** | ||
pull_request: | ||
branches: [ "develop" ] | ||
paths: | ||
- umbba-notification/** | ||
- umbba-domain/** | ||
- umbba-common/** | ||
- umbba-external/** | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
# 1) 워크플로우 실행 전 기본적으로 체크아웃 필요 | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
# 2) JDK 11버전 설치, 다른 JDK 버전을 사용하다면 수정 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
# 3) 환경변수 파일 생성 | ||
- name: make application.yml 파일 생성 | ||
run: | | ||
## create application.yml | ||
cd ./umbba-api/src/main/resources | ||
rm application.yaml | ||
|
||
# application.yml 파일 생성 | ||
touch ./application.yml | ||
|
||
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기 | ||
echo "${{ secrets.UMBBA_SECRET }}" >> ./application.yml | ||
|
||
# application.yml 파일 확인 | ||
cat ./application.yml | ||
|
||
shell: bash | ||
|
||
# 이 워크플로우는 gradle build | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle # 실제 application build(-x 옵션을 통해 test는 제외) | ||
run: ./gradlew umbba-notification:bootJar -x test |
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.
폴더링 변경 부탁드려욥