ci: frontend cache-bust + 진단에 deploy 이미지 표시
Build & Deploy to K8s / build-and-deploy (push) Successful in 4m52s
Build & Deploy to K8s / build-and-deploy (push) Successful in 4m52s
빌드 컨텍스트 변경에도 운영 frontend chunk 에 신규 라우트가 들어가지 않는 증상 발견. Kaniko/Docker layer cache 가 npm run build 단계를 잘못된 시점에 hit 하는 것으로 의심. GIT_SHA build-arg 를 npm run build 직전에 주입해 매 commit 마다 그 layer 부터 강제 invalidate. 또 진단 step 에 deploy 이미지 tag 표시 추가 — 새 image 로 갱신 됐는지 즉시 확인 가능. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,13 @@ ARG SERVER_API_URL=http://backend-spring.invyone.svc.cluster.local:8081
|
||||
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
||||
ENV SERVER_API_URL=$SERVER_API_URL
|
||||
|
||||
# Cache bust — GIT_SHA 가 매 commit 마다 다르므로 이 라인부터 아래 layer 가
|
||||
# 항상 invalidate 되어 npm run build 가 새 source 로 다시 실행됨.
|
||||
# (npm install layer 는 위쪽이라 영향 없음 — 빌드 시간 손해 없음.)
|
||||
ARG GIT_SHA=unknown
|
||||
ENV GIT_SHA=$GIT_SHA
|
||||
RUN echo "Build SHA: $GIT_SHA"
|
||||
|
||||
# Build the application
|
||||
ENV DISABLE_ESLINT_PLUGIN=true
|
||||
RUN npm run build
|
||||
|
||||
Reference in New Issue
Block a user