Jenkins构建ant-design-pro项目

选择 Freestyle project

构建

执行 Shell

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

构建后操作

Send build artifacts over SSH

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
tar -zxf prod_frontend.tar.gz
cd ./prod_frontend

cd ./merchant
yarn
yarn build
rm -rf ../deploy/merchant
mv merchant ../deploy/

cd ..
cd ./management
yarn
yarn build
rm -rf ../deploy/management
mv management ../deploy/

cd ..
cd ./deploy
pwd
yarn
yarn pm2
yarn pm2-manage

Powered by AppBlog.CN     浙ICP备14037229号

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

访客数 : | 访问量 :