Browse Source

no message

KIM-JINO5 2 months ago
parent
commit
9cbe384237
1 changed files with 13 additions and 5 deletions
  1. 13 5
      Jenkinsfile

+ 13 - 5
Jenkinsfile

@@ -6,15 +6,23 @@ pipeline {
     stages {
         stage('Build') {
             steps {
-                sh 'npm install'
+                sh 'npm ci --prefer-offline'
                 sh 'npm run build'
             }
         }
         stage('Deploy') {
             steps {
-                sh 'rsync -av --delete --exclude="web.config" --exclude="ecosystem.config.js" --exclude="restart.ps1" --exclude=".env*" .next/standalone/ ${DEPLOY_FRONTEND}/'
-                sh 'rsync -av --delete .next/static/ ${DEPLOY_FRONTEND}/.next/static/'
-                sh 'rsync -av --delete public/ ${DEPLOY_FRONTEND}/public/'
+                sh '''
+                    rsync -a --stats --delete \
+                        --exclude="web.config" \
+                        --exclude="ecosystem.config.js" \
+                        --exclude="restart.ps1" \
+                        --exclude=".env*" \
+                        --exclude="node_modules/.cache" \
+                        .next/standalone/ ${DEPLOY_FRONTEND}/
+                '''
+                sh 'rsync -a --stats --delete .next/static/ ${DEPLOY_FRONTEND}/.next/static/'
+                sh 'rsync -a --stats --delete public/ ${DEPLOY_FRONTEND}/public/'
             }
         }
         stage('Restart Frontend') {
@@ -28,4 +36,4 @@ pipeline {
         success { echo 'Frontend deploy success!' }
         failure { echo 'Frontend deploy failed!' }
     }
-}
+}