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

Using Jenkins to build projects hosted on GitHub


You can use the OpenShift Jenkins instance to build your non-OpenShift projects as well. This recipe will use a Maven-based project publicly hosted on GitHub at https://github.com/OpenShift-Cookbook/chapter10-demo-app. The goal of this recipe is to build the project whenever you push code to the GitHub repository and send an e-mail in case the build status changes, that is, the build fails or recovers from a build failure. This is the first step an organization takes when they try to introduce CI.

Getting ready

This recipe assumes that you already have a Jenkins-enabled application, as discussed in the Adding Jenkins CI to your application recipe.

How to do it…

Perform the following steps to learn how to build projects hosted on GitHub:

  1. In this recipe, we will use the Jenkins master to build the project. Go to https://jenkins-{domain-name}.rhcloud.com/configure, and update the # of executors property to 1. Any number greater than 0 will allow the...