Skip to content

ci: 이미지 빌드를 네이티브로 돌리고 캐시·병렬화로 파이프라인을 줄인다 - #92

Merged
ff1451 merged 1 commit into
mainfrom
ci/speed-up-pipeline
Oct 18, 2026
Merged

ff1451 merged 1 commit into
mainfrom
ci/speed-up-pipeline

Conversation

@ff1451

@ff1451 ff1451 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

요약

main 푸시 한 번에 약 4분 35초(verify 약 2분 + build-and-deploy 약 2분 35초)가 걸린다. 그중 약 110초는 arm64 이미지의 Node 빌드 단계(npm i -g pnpm 12.6s, pnpm install 41s, pnpm build 56.4s)를 QEMU 에뮬레이션으로 돌리는 데 쓰인다.

  • Dockerfile: builder 단계를 FROM --platform=$BUILDPLATFORM으로 바꿔 러너에서 네이티브로 빌드한다. dist는 정적 파일이라 최종 nginx 단계만 arm64로 만들면 된다.
  • Docker 빌드 캐시: 배포 이미지(deploy-arm64)와 점검 이미지(check)에 type=gha 캐시를 붙였다. 점검 이미지도 buildx로 빌드하고 load해서 verify-nginx.py를 그대로 돌린다.
  • 병렬화: 작업을 verify / image / deploy 셋으로 나눴다.
    • image는 verify와 동시에 arm64 이미지를 빌드해 커밋 SHA 태그로만 푸시한다. PR에서는 빌드만 하고 푸시하지 않는다.
    • deploy는 둘 다 통과한 뒤 imagetools create로 SHA 이미지에 latest를 붙이고, 서버 배포 스크립트(기존과 동일)를 실행한다.
  • Playwright 캐시: ~/.cache/ms-playwright를 Playwright 버전 기준으로 캐시한다. 캐시가 있으면 install-deps로 시스템 패키지만 설치한다.

바뀌는 동작

  • verify가 실패한 커밋도 GHCR에 SHA 태그 이미지가 남을 수 있다. latest가 되거나 배포되지는 않는다.

확인

  • 로컬에 Docker와 actionlint가 없어 로컬 빌드는 하지 않았다. 이 PR 실행이 첫 검증이다.
  • PR 실행으로 확인되는 것: 워크플로 문법, Playwright 캐시, 점검 이미지 빌드, arm64 크로스 빌드(푸시 없이).
  • PR 실행으로 확인되지 않는 것: GHCR 푸시, latest 재태그, 서버 배포. 머지 후 첫 main 실행을 끝까지 지켜본다. image나 재태그 단계에서 실패하면 배포 단계는 돌지 않아 서버에는 기존 컨테이너가 유지된다.
  • 첫 실행은 캐시가 비어 있으므로 효과는 두 번째 main 실행부터 측정한다. 예상치(전체 약 2분 안팎)는 추정이다.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9bd67acb-cfc6-428e-a411-bb2616bf7e8c
📥 Commits

Reviewing files that changed from the base of the PR and between d2c70de and 3b9bd86.

📒 Files selected for processing: 2
  • .github/workflows/deploy.yml
  • Dockerfile
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ff1451
ff1451 merged commit e29dd81 into main Oct 18, 2026
7 checks passed
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.

1 participant