Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

Adding Jenkins CI to your application


Adding Jenkins to your application is a two-step process. You have to first create the Jenkins server application and then add the Jenkins client cartridge to your application. In this recipe, you will learn how to add Jenkins CI to an existing OpenShift application. After adding Jenkins to your application, each Git push to your OpenShift application Git repository will initiate a Jenkins job that will build the project and then deploy it to OpenShift.

Getting ready

To complete this recipe, you will need three available gears. One gear will be used by the application, and Jenkins will consume the remaining two gears. This chapter will use the application created in Chapter 7, OpenShift for Java Developers. If you don't have this application running, then recreate the application using the following command:

$ rhc app create jobstore jbosseap postgresql-9.2 --from-code https://github.com/OpenShift-Cookbook/chapter7-jobstore-javaee6.git

How to do it…

Perform...