当先锋百科网

首页 1 2 3 4 5 6 7

SpringBoot

Pre Steps-Excute shell

可以运行安装包的脚本,有些项目可以不需要

Build

clean -Dmaven.test.skip=true package -P dev install

Post Steps-Excute shell

rm -rf /usr/local/emba-serve/dev/jeecg-boot-module-system-2.4.6.jar
rm -rf /usr/local/emba-serve/dev/nohup.out
cp /var/lib/jenkins/workspace/EMBA-service/jeecg-boot/jeecg-boot-module-system/target/jeecg-boot-module-system-2.4.6.jar \
/usr/local/emba-serve/dev

pid=$(jps -l | grep /usr/local/emba-serve/dev/jeecg-boot-module-system-2.4.6.jar | awk '{print $1}')
if [ ! -n "$pid" ]; then
echo "no applicaion need kill"
else
 for i in $pid;do kill -9 "$i"; done;
echo "kill success."
fi

cd /usr/local/emba-serve/dev
ls
BUILD_ID=donKillMe
./start.sh
jps -l

Vue

构建环境

选择"Provide Node & npm bin/ folder to PATH"选项

构建-Excute shell

 cd /var/lib/jenkins/workspace/EMBA-UI/ant-design-vue-jeecg
echo $PATH
node -v
npm -v
yarn config set registry https://registry.npm.taobao.org -g
#!bin/sh -l
npm install -g yarn
yarn -v
yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
yarn config get registry
yarn 
yarn build 
cd dist
ls
rm -rf /usr/local/gzxf/ui/nginx/emba-ui/dev/*
mv ./* /usr/local/gzxf/ui/nginx/emba-ui/dev
ls /usr/local/gzxf/ui/nginx/emba-ui/dev/