Jenkins构建vue项目

选择 Freestyle project

构建

执行 Shell

1
2
3
4
5
6
pwd
git checkout develop
git pull
cd ..
tar -zcf prod_mall.tar.gz ./prod_mall --exclude *.tar.gz
mv prod_mall.tar.gz ./prod_mall/

构建后操作

Send build artifacts over SSH

Transfer Source files: **/prod_mall.tar.gz
Exec command:

1
2
3
4
5
6
tar -zxf prod_mall.tar.gz
cd ./prod_mall
pwd
npm i
npm run build
npm run pm2

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :