Automated deployment is one of the most important aspects of automated operations, and if a company often calls for automated operations, but does not have the concept of continuous integration, does not implement automated deployment, and requires programmers to manually package the deployment, then no doubt its production mode is backward. There are many tools for continuous integration, and Jenkins is one of the typical representatives.
1, after testing,jenkins2.0 under the tomcat6.0.39+jdk1.6 can not run up, change jdk1.8 under the.
2. Repair Change Jenkins to run home directory
Jenkins Default Save all data files in /root/.jenkins, this path is more awkward, modified, the method has two:
1), directly inside the Tomcat catalina.sh add: Export jenkins_home=
2), directly in the environment file settings, such as/etc/profile
3. let Jenkins build with a specific JDK version
after testing, configuring a separate Jdkpath inside the build.xml seems useless, and executing ant will compile with the system's own JDK version. So, how do you configure a separate JDK version? The method is to add a global attribute to the Jenkins System Management-system setup, and set up a java_home, such as:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/EF/wKiom1dFFNqAqTKZAAAgQY0KovQ468.png "title=" JDK configuration. PNG "alt=" Wkiom1dffnqaqtkzaaagqy0kovq468.png "/>
4. Send an email.
Jenkins Mail plugin and extension mail plugin used to be too cumbersome, personal strongly recommend to use Python to complete a script, Python smtplib library simple and easy to use, send html+ pictures is very easy, compared to the Linux mailx, a lot more powerful. If the build fails, call this script to send the build log to the relevant person.
5. Automatic deployment
The automatic deployment of Jenkins is done through a plugin called "Deploy to Container Plugin", which uses the Tomcat admin interface to bring in the war packet. Personal feeling is not very good, as we all know, although Tomcat can automatically identify the war package, but the security of the practice is to restart, do not restart, after repeated deployment of the war package, the JVM will slowly occur problems. and reboot, shutdown often not thorough enough, must kill-9 kill the Tomcat process. Based on this, I also recommend manual completion of automatic deployment, the Jenkins machine and the remote machine to build trust between the first backup, then upload the war package, and then restart. Even so, also pay attention to the remote Web server monitoring, I encountered a remote Web server memory is not enough (with a lot of swap), resulting in the deployment of the past war package, the Lib does not load to cause project start failure, reported monitoring boot error: Severe:error Listenerstart
This article is from "Memory Fragment" blog, reprint please contact the author!
Continuous integration: Key points of jenkins2.0 implementation