Skip to content

Commit

Permalink
스니펫 s3에 업로드하고 다운로드하는 방식으로 수정 (#151)
Browse files Browse the repository at this point in the history
* style[api-server]: deploy 배포 CI/CD 테스트

* 머지 완료되었을 때만 실행되도록 수정 (#143)

* fix[api-server]: 깃허브 액션 작업 이름 수정

* fix[api-server]: 머지 완료되었을 때만 실행되도록 수정

* style[api-server]: 게이트웨이 공백 수정 (CI/CD 테스트)

* fix[api-server]: 추첨, 선착순 서버 머지 완료되었을 때만 실행되도록 수정

* github readme추가 (#147)

* docs: 서버 아키텍처 이미지 추가

* docs: 배포 아키텍처 이미지 추가

* CI-CD 파이프라인 개선 (#148)

* feat[api-server]: swagger 업로드 파이프라인 추가

* fix[api-server]: swagger 배포를 분리

* style[api-server]: 변경사항 테스트

* 스니펫 s3에 업로드하고 다운로드하는 방식으로 수정 (#150)

* feat[api-server]: swagger 업로드 파이프라인 추가

* fix[api-server]: swagger 배포를 분리

* style[api-server]: 변경사항 테스트

* fix[api-server]: 스니펫 s3에 업로드하고 다운로드하는 방식으로 수정

* style[api-server]: CI-CD 변경사항 테스트

* fix[api-server]: 추첨 서비스 스니펫 파일 위치 수정

---------

Co-authored-by: 유성욱 <[email protected]>
  • Loading branch information
ysndy and starwook authored Aug 26, 2024
1 parent a980016 commit 7775fdd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/api-lottery-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,16 @@ jobs:
ls -la lottery/build/generated-snippets/
# 스웨거 소스 업로드
- name: Upload multiple files as an artifact
uses: actions/upload-artifact@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
name: lottery-snippets
path: lottery/build/generated-snippets/*
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
aws-region: 'ap-northeast-2'

- name: Upload files to S3
run: |
aws s3 cp lottery/build/generated-snippets/ s3://watermelon-s3-bucket/snippets/ --recursive
# 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가
- name: Publish Unit Test Results
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/api-order-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,16 @@ jobs:
ls -la order/build/generated-snippets/
# 스웨거 소스 업로드
- name: Upload multiple files as an artifact
uses: actions/upload-artifact@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
name: order-snippets
path: order/build/generated-snippets/*
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
aws-region: 'ap-northeast-2'

- name: Upload files to S3
run: |
aws s3 cp order/build/generated-snippets/ s3://watermelon-s3-bucket/snippets/ --recursive
# 테스트 후 Result를 보기위해 Publish Unit Test Results step 추가
- name: Publish Unit Test Results
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,24 @@ jobs:
steps:

# 스니펫을 불러온다.
- name: Download multiple files as an artifact
uses: actions/download-artifact@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
name: order-snippets
path: order/build/generated-snippets/
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
AWS_REGION: 'ap-northeast-2' # 리전 정보

- name: Download multiple files as an artifact
uses: actions/download-artifact@v3
with:
name: lottery-snippets
path: lottery/build/generated-snippets/
- name: Download files from S3
run: |
aws s3 cp s3://watermelon-s3-bucket/snippets/ ./merged-api-spec --recursive
- name: Verify files downloaded
run: |
echo "Download Files"
ls -la order/build/generated-snippets/
ls -la lottery/build/generated-snippets/
ls -la ./merged-api-spec
- name: Generate Swagger Document
run: |
./gradlew mergeApiSpecs
./gradlew openapi3
./gradlew customGenerateSwaggerUI
ls
Expand Down

0 comments on commit 7775fdd

Please sign in to comment.