1. 程式人生 > >jenkins打包

jenkins打包

start tom jenkins star catalina apps source 1.8 java

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打包