fix: [deploy] 빌드 캐시 보존 cp→mv 변경 (복사 오버헤드 제거)
- cp -r 9GB 캐시 복사로 빌드 시간 오히려 증가 (4분→9분) - mv로 변경하여 순간 이동 (같은 파일시스템 포인터 변경)
This commit is contained in:
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user