Install the required plug-in
Email Extension Plugin GIT Plugin Publish over SSH
Install MAVEN JDK configuration e-mail triggers and other configuration login keys on a chapter blog
New MAVEN Project
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/82/88/wKioL1dYFhSysm_wAACuluKxEDY264.png-wh_500x0-wm_3 -wmp_4-s_198072199.png "title=" 11.PNG "alt=" Wkiol1dyfhsysm_waaculukxedy264.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/82/88/wKioL1dYFpnTyjwdAABq5-goWAI112.png-wh_500x0-wm_3 -wmp_4-s_1847309385.png "title=" 12.PNG "alt=" Wkiol1dyfpntyjwdaabq5-gowai112.png-wh_50 "/>
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/82/8A/wKiom1dYFdzTIw7_AACJDY7N-f4222.png-wh_500x0-wm_3 -wmp_4-s_1098961520.png "title=" 13.PNG "alt=" Wkiom1dyfdztiw7_aacjdy7n-f4222.png-wh_50 "/>
Pom.xml development files must be in a git project
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/82/8A/wKiom1dYFnLzZ0gDAABIkyhmaDw774.png-wh_500x0-wm_3 -wmp_4-s_48339441.png "title=" 14.PNG "alt=" Wkiom1dyfnlzz0gdaabikyhmadw774.png-wh_50 "/>
cd/root/.jenkins/jobs/qq.com/workspace/
TAR-JCF qq.com.tar.gz./*
scp/root/.jenkins/jobs/qq.com/workspace/*.gz [Email protected]:/opt/data/
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/82/8A/wKiom1dYFrjQzqcLAAAiOBxpBL0866.png-wh_500x0-wm_3 -wmp_4-s_572616795.png "title=" 15.PNG "alt=" Wkiom1dyfrjqzqclaaaiobxpbl0866.png-wh_50 "/>
publish.sh Script Content
#!/bin/bash
Tomcat_home= "/opt/tomcat"
project= "ROOT"
bak_dir=/opt/bak/' Date +%y-%m%-d%-h%-m%-s '
Dir= "/opt/tomcat/webapps/root"
#shutdown Tomcat
${tomcat_home}/bin/shutdown.sh
echo "Tomcat shutdown"
Sleep 3
#publish Project
Rm-rf "${tomcat_home}"/webapps/"$PROJECT"/*
Cp-r/opt/data/* "${tomcat_home}"/webapps/"$PROJECT"/
#remove tmp
rm-rf/opt/data/*
CD $DIR
TAR-XF *.gz
RM-RF *.gz
#bak Project
Cp-r "$DIR" "$BAK _dir"/
#start Tomcat
"${tomcat_home}"/bin/startup.sh
echo "Tomcat is starting!"
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/82/88/wKioL1dYGEaTA6u4AAB31gLBit4273.png-wh_500x0-wm_3 -wmp_4-s_4630554.png "title=" 16.PNG "alt=" Wkiol1dygeata6u4aab31glbit4273.png-wh_50 "/>
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/82/88/wKioL1dYGLuC_CKcAACGG88ZEUk129.png-wh_500x0-wm_3 -wmp_4-s_1224971180.png "title=" 17.PNG "alt=" Wkiol1dygluc_ckcaacgg88zeuk129.png-wh_50 "/>
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/82/8A/wKiom1dYF77SePnWAAC4NgHBEe4564.png-wh_500x0-wm_3 -wmp_4-s_2808729368.png "title=" 18.PNG "alt=" Wkiom1dyf77sepnwaac4nghbee4564.png-wh_50 "/>
Ok
Http://www.thinksaas.cn/topics/0/378/378471.html
Jenkind + git + mave + shell + Tomcat