修改Jenkins打包部署

This commit is contained in:
program-walker 2020-09-28 18:29:38 +08:00
parent 44e7b47287
commit c7df1f83a2
2 changed files with 5 additions and 1 deletions

View File

@ -11,13 +11,16 @@ pipeline {
nodejs 'nodejs-10' nodejs 'nodejs-10'
} }
steps { steps {
sh 'npm update'
sh 'npm install' sh 'npm install'
sh 'npm run build' sh 'npm run build'
} }
} }
stage('Publish') { stage('Publish') {
steps { steps {
sh 'cp -rf ./dist/* /usr/local/joylink/jlclient' sh 'mkdir -p /usr/local/joylink/official-website'
sh 'rm -rf /usr/local/joylink/official-website/*'
sh 'cp -rf ./dist/* /usr/local/joylink/official-website/'
} }
} }
} }

View File

@ -11,6 +11,7 @@ pipeline {
nodejs 'nodejs-10' nodejs 'nodejs-10'
} }
steps { steps {
sh 'npm update'
sh 'npm install' sh 'npm install'
sh 'npm run build' sh 'npm run build'
} }