13.7. Jenkins Continuous Integration

13.7.1. Introduction to Jenkins

The Jenkins cartridge integrates with OpenShift Online applications to provide continuous integration by monitoring execution of repeated jobs. Visit http://jenkins-ci.org/ for more information about Jenkins.
The Jenkins client cartridge must be added to a new or existing application for it to build with Jenkins. After the Jenkins client cartridge is added to an application, the git push command initiates a build process inside Jenkins. For custom applications, or applications that have no upstream repositories, the build process is initiated directly from the Jenkins web interface rather than with the git push command.
There are a number of benefits that come with using Jenkins to build applications:
  • Archived build information
  • No application downtime during the build process
  • Failed builds are not deployed; instead, a previous working version is left in place
  • Additional memory and storage resources are available
  • A large community of Jenkins plug-ins
Jenkins can be used to build any number of applications, and is only limited by the number of available gears. For example, if a PHP application is created and MySQL database is on the first gear, then Jenkins is added to a separate gear. A third gear is used for the Jenkins builder. In other words, whenever the Jenkins builder is active, it occupies one of the available gears.