OpenShift(Minishift) GitHub Integration

As explained in previous article we can trigger builds with minishift when ever we push changes to our github repository. In this article we will cover how we can do that locally using Minishift.

Build Trigger

OpenShift 3 gives you the ability to use the S2I(Source-to-Image) functionality to build docker based images on the fly from existing source code.And then you could also trigger automated builds any time you update your repository. This is supported via webhooks and specifically Github hooks. Following are the steps as mentioned on the Openshift Blog.

Once you are able to successfully follow the steps as mentioned on the Openshift blog on your Github webhooks tab you will see something like above. It should be green otherwise it won’t work correctly.

Then once a build is triggered via S2I as you can see in the Triggered By sections build is triggered via Github webhook. Build strategy is Source since we are building via S2I functionality. We simply updated the readme file and pushed the changes.

Screenshot from Build Tab Minishift
Build triggered

Once the build is triggered you can see that S2I is doing is work as expected by cloning the repository first and then doing the build. Later on after the build is success as seen below the image will pushed for further execution.

Image created and pushed
Pods running

Pod is running :).

Support me

If you like what you just read then you can buy me a coffee.

Further reading

You can also read some of my previous articles.

Software Engineer | Tech lover | Forever Learner

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store