From 57358955d97fb4d1d7e99f9d2653939a1a4b2d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 20 Mar 2026 07:27:55 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20[deploy]=20Next.js=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EC=BA=90=EC=8B=9C=20=EB=B3=B4=EC=A1=B4=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B9=8C=EB=93=9C=20=EC=8B=9C=EA=B0=84=20=EB=8B=A8?= =?UTF-8?q?=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - checkout 전 .next/cache 백업 → checkout 후 복원 - 증분 빌드 활성화 (변경된 파일만 재컴파일) - 예상: 101초 → 30~50초 --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 21247915..0984c71b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -75,11 +75,11 @@ pipeline { stage('Checkout') { when { expression { params.ACTION == 'deploy' } } steps { - // .next/cache 백업 (증분 빌드용) - sh 'rm -rf /tmp/.next-cache-backup && [ -d .next/cache ] && cp -r .next/cache /tmp/.next-cache-backup || true' + // .next/cache 백업 (증분 빌드용 — mv로 순간 이동, 복사 오버헤드 없음) + sh 'rm -rf /tmp/.next-cache-backup && [ -d .next/cache ] && mv .next/cache /tmp/.next-cache-backup || true' checkout scm // .next/cache 복원 - sh 'mkdir -p .next && [ -d /tmp/.next-cache-backup ] && cp -r /tmp/.next-cache-backup .next/cache && rm -rf /tmp/.next-cache-backup || true' + sh 'mkdir -p .next && [ -d /tmp/.next-cache-backup ] && mv /tmp/.next-cache-backup .next/cache || true' script { env.GIT_COMMIT_MSG = sh(script: "git log -1 --pretty=format:'%s'", returnStdout: true).trim() }