jenins 一键自动部署
ps aux|grep weixin|grep -v grep|grep -v kafka|grep -v fileserver|grep -v jenkins|awk '{print $2}'|xargs kill -9
#ps aux|grep api|grep -v grep|grep -v fileserver|grep -v jenkins|cut -c 9-15|xargs kill -9
sleep 3
# path="/home/jenkins/jenkins_home/workspace/car_loan/wjs/car-loan-parent/car-loan-web/target/car-loan-web-0.0.1-SNAPSHOT"
# cd $path
#echo " ====> 项目编译打包中 ..."
#mvn clean package install -DskipTests
cd /home/weixin/apache-tomcat-7.0.69/webapps/
rm -rf ./*
cd /home/jenkins/jenkins_home/workspace/weixin/wjs-web-parent/wjs-wechat-web/target/
cp -r wjs-wechat-web-0.0.1-SNAPSHOT/ /home/weixin/apache-tomcat-7.0.69/webapps/
cd /home/weixin/apache-tomcat-7.0.69/work/
rm -rf *
echo " ====> 开始重启tiku-module-tomcat中 ..."
cd /home/weixin/apache-tomcat-7.0.69/bin/
./startup.sh & tail -f ../logs/catalina.out
echo " ====> 主人,项目部署完毕了 ..."