#npm install
#rm -rf ./dist
#npm run build
#rm -rf /opt/*
#cp -rf ./dist/* /opt
#Command
#npm install npm run build执行打包的一些操作,不多介绍
#cd dist 跳转目录
#dist.tar.gz 删除压缩包
#tar -zcvf dist.tar.gz *的意思是将dist目录打成一个压缩包
#mv dist.tar.gz /opt/demo/dist/ 移动压缩包到指定目录下
#tar -zxvf dist.tar.gz 解压压缩包
#rm -rf dist.tar.gz解压后删除压缩包
#---------------------------------------------------
node -v
npm -v
npm install
rm -rf ./dist
npm run build
rm -rf /home/wwwroot/web/*
cp -rf ./dist/* /home/wwwroot/web
#权限不够
chown -R jenkins:jenkins /home
npm run build报错
building for production...Killed
配置一个单独的内存(重启可能消失)
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1