Repository navigation
ci: 이미지 빌드를 네이티브로 돌리고 캐시·병렬화로 파이프라인을 줄인다 - #92
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
main푸시 한 번에 약 4분 35초(verify 약 2분 + build-and-deploy 약 2분 35초)가 걸린다. 그중 약 110초는 arm64 이미지의 Node 빌드 단계(npm i -g pnpm12.6s,pnpm install41s,pnpm build56.4s)를 QEMU 에뮬레이션으로 돌리는 데 쓰인다.FROM --platform=$BUILDPLATFORM으로 바꿔 러너에서 네이티브로 빌드한다.dist는 정적 파일이라 최종 nginx 단계만 arm64로 만들면 된다.deploy-arm64)와 점검 이미지(check)에type=gha캐시를 붙였다. 점검 이미지도 buildx로 빌드하고load해서verify-nginx.py를 그대로 돌린다.verify/image/deploy셋으로 나눴다.image는verify와 동시에 arm64 이미지를 빌드해 커밋 SHA 태그로만 푸시한다. PR에서는 빌드만 하고 푸시하지 않는다.deploy는 둘 다 통과한 뒤imagetools create로 SHA 이미지에latest를 붙이고, 서버 배포 스크립트(기존과 동일)를 실행한다.~/.cache/ms-playwright를 Playwright 버전 기준으로 캐시한다. 캐시가 있으면install-deps로 시스템 패키지만 설치한다.바뀌는 동작
verify가 실패한 커밋도 GHCR에 SHA 태그 이미지가 남을 수 있다.latest가 되거나 배포되지는 않는다.확인
latest재태그, 서버 배포. 머지 후 첫main실행을 끝까지 지켜본다.image나 재태그 단계에서 실패하면 배포 단계는 돌지 않아 서버에는 기존 컨테이너가 유지된다.main실행부터 측정한다. 예상치(전체 약 2분 안팎)는 추정이다.