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.
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.
Using GitHub hooks with your local OpenShift environment — Red Hat OpenShift Blog
One of the great features of OpenShift 3 is the ability to use the Source-to-Image functionality to build docker based…
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.
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.
Pod is running :).
If you like what you just read then you can buy me a coffee.
You can also read some of my previous articles.