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

Creating a Jenkins workflow for your OpenShift applications


In this recipe, you will create a Jenkins workflow that you could use to build and deploy applications on OpenShift.

Getting ready

This recipe will cover all the steps from the start to make sure you have all the three gears available.

How to do it…

Perform the following steps to create a Jenkins workflow for your OpenShift applications:

  1. Create a new Jenkins server application by running the following command. This was covered in detail in the Adding Jenkins CI to your application recipe.

    $ rhc create-app jenkins jenkins
    
  2. Create an OpenShift Apache Tomcat 7 application that will be used to deploy the project. The project will be created with the --no-git option, as we do not want to clone the repository, because the code will be hosted on GitHub. The --enable-jenkins option will create a new Jenkins job that will build and deploy the application on OpenShift:

    $ rhc create-app forumapp tomcat-7 postgresql-9 --enable-jenkins --no-git
    
  3. Log...