hudson 通过命令行部署

hudson的设置的command中
添加
/opt/zhiweiwen/test44.sh

[@mhmaster.focus.cn zhiweiwen]$ cat test44.sh 
#! /bin/sh


cd /opt/data/tomcat7_3/local/tmp && rm -rf ./* && rm -rf /opt/data/tomcat7_3/local/stat/* && git clone [email protected]:liguoliu/focus-mobile-stat.git && cd /opt/data/tomcat7_3/local/tmp/focus-mobile-stat && git pull && mvn -U -Dmaven.test.skip=true clean package && cp -R /opt/data/tomcat7_3/local/tmp/focus-mobile-stat/* /opt/data/tomcat7_3/local/stat/ && /opt/zhiweiwen/restart44


#restart44 重启tomcat服务
#!/bin/sh
#!/bin/kill
 
signal=`ps aux | grep tomcat7_3 | grep -v grep | awk -F " " '{print $2}'`
 
kill -9 $signal
echo "进程号:"$signal;
#/opt/data/tomcat7_3/bin/catalina.sh startr
service tomcat7_3 start
#cd /opt/data/tomcat7_3/bin/  start
echo "done!!!!!"

猜你喜欢

转载自wangqiaowqo.iteye.com/blog/2073569
今日推荐