Skip to content

Commit

Permalink
fix[api-server]: 스니펫 s3에 업로드하고 다운로드하는 방식으로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ysndy committed Aug 26, 2024
1 parent 0be28db commit e99ceb3
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 order/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 e99ceb3

Please sign in to comment.