码迷,mamicode.com
首页 > 其他好文 > 详细

jenkins打包

时间:2018-08-30 20:05:29      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:log   war   backup   shutdown   rm -rf   lin   webapps   down   bin   

vim tomcat.sh
source /etc/profile

cd /var/opt/backup/datacenter
/usr/lib/java/jdk1.8.0_45/bin/jar -xvf .war
rm -rf
.war
cd /var/opt/tomcat/datacenter
sh shutdown.sh
rm -rf logs/
rm -rf /var/opt/tomcat/datacenter/webapps/datacenter/

mv /var/opt/backup/datacenter/ /var/opt/tomcat/datacenter/webapps/datacenter
cp -r /var/opt/tomcat/datacenter/file/
/var/opt/tomcat/datacenter/webapps/datacenter/WEB-INF/conf
sh /var/opt/tomcat/datacenter/tomcat.sh start
sleep 30
tail -n 300 /var/opt/tomcat/datacenter/logs/catalina.out
exit

jenkins打包

标签:log   war   backup   shutdown   rm -rf   lin   webapps   down   bin   

原文地址:http://blog.51cto.com/guoshaoliang789/2166788

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!