Skip to content
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

[FE] 프론트엔드 CD 파이프라인 업데이트 #451

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Yoonkyoungme
Copy link
Contributor

관련 이슈

작업 내용

기존 우아한테크코스 AWS 계정에서 MOMO 자체 AWS 계정으로 전환함에 따라 프론트엔드 dev 및 prod 배포 파이프라인을 업데이트했습니다.

주요 변경 사항

  1. AWS 계정 변경

    • S3 버킷 및 CloudFront 배포 ID를 MOMO의 AWS 계정으로 변경
    • AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY 추가하여 AWS 인증 방식 적용
  2. 배포 방식 개선

    • runs-on: [self-hosted, linux, ARM64, dev]runs-on: ubuntu-latest 변경하여 배포 환경 통일
    • 배포 대상 S3 버킷 경로 변경
      • s3://techcourse-project-2024/momo-devs3://momo-fe-s3/momo-fe-dev/
      • s3://techcourse-project-2024/momos3://momo-fe-s3/momo-fe-prod/
  3. IAM 권한 문제 해결

    • 배포 과정에서 IAM 사용자(momo-fe)가 S3 버킷(momo-fe-s3)에서 s3:ListBucket 작업을 수행할 권한이 없어 오류 발생 → 아래의 정책을 적용하여 배포 시 S3 버킷 접근 권한 문제 해결
      {
        "Action": [
          "s3:ListBucket",
          "s3:PutObject",
          "s3:GetObject",
          "s3:DeleteObject"
        ],
        "Effect": "Allow",
        "Resource": "arn:aws:s3:::<버킷명>"
      }
  4. 배포 워크플로우 테스트

    • 검증을 위해 MOMO의 main 레포지토리를 fork하여 개인 레포지토리에서 배포 테스트 진행

    • 업데이트된 CD 워크플로우의 정상 동작을 검증하기 위해 build된 정적 파일이 momo-fe-s3 S3 버킷의 test 경로에 업로드되는지 확인하였습니다. 이후 CloudFront 캐시를 무효화하여 변경 사항이 정상적으로 반영되는지 검증하였습니다. (https://test.momonow.kr)

      dev CD 동작 확인 prod CD 동작 확인
      image image

특이 사항

리뷰 요청 사항 (선택)

@Yoonkyoungme Yoonkyoungme added 🐈 프론트엔드 프론트엔드 관련 이슈에요 :) ⚙️ 환경설정 환경을 설정해요 :) labels Feb 5, 2025
@Yoonkyoungme Yoonkyoungme self-assigned this Feb 5, 2025
Copy link
Member

@hw0603 hw0603 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~👍🏻

Comment on lines -75 to +76
- name: 프론트엔드 리소스 결과물을 깃허브 레파지토리 artifacts로 업로드해요
- name: 프론트엔드 리소스 결과물을 깃허브 레파지토리 artifacts로 업로드해요 :)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣

Copy link
Contributor

@ehBeak ehBeak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빙봉뱅 고생하셨습니다~!~~!~!! 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ 환경설정 환경을 설정해요 :) 🐈 프론트엔드 프론트엔드 관련 이슈에요 :)
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants