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

🛠️ CI/CD 파이프라인 구축 #5

Merged
merged 17 commits into from
Apr 10, 2024
Merged

🛠️ CI/CD 파이프라인 구축 #5

merged 17 commits into from
Apr 10, 2024

Conversation

BangDori
Copy link
Collaborator

@BangDori BangDori commented Apr 9, 2024

작업 이유

CI/CD 파이프라인 구축


작업 사항

지속적 통합(Continuous Integration)

pennyway_ci_pipeline
  1. Pull Request on develop branch
  2. Github Actions와 AWS Amplify가 실행됩니다.
    • test.yml workflow에 등록된 lint와 test를 진행합니다.
    • AWS Amplify가 Pull Request 요청에 대한 Web Preview URL을 댓글로 제공합니다.
  3. 2번 단계가 성공적으로 완료될 시, 코드 리뷰를 진행합니다.

지속적 배포(Continuous Deployment)

pennyway_cd_pipeline
  1. Merge on develop branch
  2. Github Actions 실행
    • deploy.yml에 등록된 workflow를 실행합니다.
    • docker에 pennyway/pennyway-webview에 이미지를 업로드합니다.
    • docker hub에 pennyway/pennyway-webview 이미지를 push합니다.
    • 기존에 docker container에서 동작하고 있었던, webview container를 중지합니다.
    • 기존에 있던 AWS EC2 서버에 등록된 이미지를 제거하고, docker hub에 등록된 pennyway/pennyway-webview 이미지를 pull합니다.
    • AWS EC2 서버에 등록된 최신 버전의 이미지를 실행합니다.

위 작업 사항은 wiki CI CD Pipeline 문서에 정리해두었습니다!!


리뷰어가 중점적으로 확인해야 하는 부분

  • CI/CD Pipeline이 제대로 구축되어 있나요?
  • Default branch가 main으로 제대로 설정되어 있나요?
  • branch rule이 제대로 설정되어 있나요?

발견한 이슈

github flow를 git flow랑 착각하여 CI/CD Pipeline trigger가 develop 브런치로 설정되어 있어, github flow에 맞춰 아래의 내용을 수정하였습니다.

  1. CI/CD Pipeline trigger: develop -> main
  2. Default branch: develop -> main
  3. Branch rule: master -> main
  4. Master 브런치 제거
  5. AWS Amplify develop 브런치 설정 제거

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-5.d1g08iscmw15er.amplifyapp.com

@BangDori BangDori closed this Apr 9, 2024
@BangDori BangDori reopened this Apr 9, 2024
@BangDori BangDori closed this Apr 9, 2024
@BangDori BangDori reopened this Apr 9, 2024
Copy link
Member

@jinlee1703 jinlee1703 left a comment

Choose a reason for hiding this comment

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

사소한 팁 공유드립니다! 필요하시다면 추가로 수정하셔도 좋을 것 같아요 :)

.github/workflows/deploy.yml Show resolved Hide resolved
@BangDori BangDori requested a review from Legitgoons April 10, 2024 04:38
@BangDori BangDori changed the base branch from develop to main April 10, 2024 06:35
@BangDori
Copy link
Collaborator Author

Github flow에 맞춰 develop branch로 병합이 아닌, main branch로 병합하기 위해 아래 base 변경하고, Pull Request Reopen 하겠습니다!

image

@BangDori BangDori closed this Apr 10, 2024
@BangDori BangDori reopened this Apr 10, 2024
Copy link
Member

@Legitgoons Legitgoons left a comment

Choose a reason for hiding this comment

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

수고많으셨습니다! 병합하셔도 좋습니당!

.yarnrc.yml Show resolved Hide resolved
@BangDori BangDori merged commit f96266a into main Apr 10, 2024
3 checks passed
@BangDori BangDori deleted the feature/PW-249-cicd branch April 10, 2024 07:08
@BangDori BangDori self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants