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 파이프라인이 눈에 잘 보이도록 스크립트 개선(Issue #88) #89

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

robinjoon
Copy link
Contributor

여러 워크 플로우를 하나의 스크립트로 통합.

구현 요약

  1. 프론트엔드와 백엔드 CI 스크립트 통합
  2. CI 및 CD 워크 플로우 가시성 개선

연관 이슈

close #88

참고

코드 리뷰에 RCA 룰을 적용할 시 참고해주세요.

헤더 설명
R (Request Changes) 적극적으로 반영을 고려해주세요
C (Comment) 웬만하면 반영해주세요
A (Approve) 반영해도 좋고, 넘어가도 좋습니다. 사소한 의견입니다.

여러 워크 플로우를 하나의 스크립트로 통합.
@robinjoon robinjoon added 🚛 백엔드 백엔드 관련 이슈 🎨 프론트엔드 프론트엔드 관련 이슈 🚀 개선 성능의 개선 혹은 리팩토링 labels Jul 21, 2024
@robinjoon robinjoon added this to the 두번째 스프린트 milestone Jul 21, 2024
@robinjoon robinjoon requested a review from lilychoibb July 21, 2024 12:01
@robinjoon robinjoon self-assigned this Jul 21, 2024
@alstn113
Copy link
Member

음 지나가는 길인데용.
ci 파일을 하나로 합치면 뭐가 좋은거죠??

@robinjoon
Copy link
Contributor Author

음 지나가는 길인데용. ci 파일을 하나로 합치면 뭐가 좋은거죠??

image

@alstn113
Copy link
Member

alstn113 commented Jul 21, 2024

음 지나가는 길인데용. ci 파일을 하나로 합치면 뭐가 좋은거죠??

image

아 저게 한 파일에 있어야 올려주신 그래프처럼 보인다는 말이군요!

이슈 봤는데 이해못했습니다 ㅎ,,,

@robinjoon
Copy link
Contributor Author

음 지나가는 길인데용. ci 파일을 하나로 합치면 뭐가 좋은거죠??

image

아 저게 한 파일에 있어야 올려주신 그래프처럼 보인다는 말이군요!

이슈 봤는데 이해못했습니다 ㅎ,,,

네 ㅋㅋㅋ 그리고 여러 워크플로우가 한번에 트리거되면 여기도 더러워져요
image

Comment on lines +56 to +57
id: deploy
run: ls
Copy link
Contributor Author

Choose a reason for hiding this comment

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

아직 배포 스크립트를 작성하지 않아서 이대로 뒀어요! 이번 이슈의 목표는 어디까지나 워크플로우의 가시성 향상이니까요!

Comment on lines +24 to +27
outputs:
build: ${{ steps.build_result.outputs.result }}
deploy: ${{ steps.deploy_result.outputs.result }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

어떤 job 이나 step 의 결과를 저장하여 다른 step 이나 job에서 사용하고 싶은 경우 outputs 라는 컨텍스트를 사용하면 된다고 해서 적용했어요!

https://docs.github.com/ko/actions/using-jobs/defining-outputs-for-jobs

Comment on lines +66 to +67
runs-on: ubuntu-latest
needs: [CD]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

need 를 통해 job 사이에 의존성을 설정할 수 있어서 사용했어요! 의존을 설정하지 않으면 여러 job 은 병렬로 실행되지만, 의존성이 있다면 해당 부분을 순서대로 실행하게 할 수 있어요!

알림을 보내는 부분은 self-hosted 를 사용할 이유가 없어서 우분투에서 돌아가도록 했어요. 깃허브에서 이런식으로 job으로 구분하면, 두 job 사이에 지연이 발생한다는 점이 단점인 것 같아요!

@robinjoon robinjoon merged commit 4d30e68 into main Jul 22, 2024
4 of 5 checks passed
@Minjoo522 Minjoo522 deleted the feat/#88 branch July 25, 2024 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 프론트엔드 프론트엔드 관련 이슈 🚀 개선 성능의 개선 혹은 리팩토링 🚛 백엔드 백엔드 관련 이슈
Projects
Status: 😎 DONE
Development

Successfully merging this pull request may close these issues.

CI CD 파이프라인이 눈에 잘 보이도록 스크립트 개선
2 participants