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:
- 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 to1
. Any number greater than0
will...