pipeline { agent { node { label 'master' } } stages { stage('Package') { tools { nodejs 'nodejs-10' } steps { sh 'npm update' sh 'npm install' sh 'npm run build' } } stage('Publish') { steps { 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/' } } } }