Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
/ ultrahook Public archive

Ultrahook Client for OpenShift

License

Notifications You must be signed in to change notification settings

AICoE/ultrahook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ultrahook Client for OpenShift

This repository contains s2i ready OpenShift application based on Ultrahook Client

Usage

Deployment

To import the template, run:

oc apply -f openshift/ultrahook.app.yaml

To import API key secret, run:

oc process -f openshift/ultrahook.secret.yaml ULTRAHOOK_API_KEY=`echo -n "<your_api_key>" | base64` | oc apply -f -

To deploy the ultrahook client, run:

oc process ultrahook ULTRAHOOK_SUBDOMAIN=<some_subdomain> ULTRAHOOK_DESTINATION=<destination_url> | oc apply -f -

Or you can do the same thing in OpenShift Console UI.

You will find a new DeploymentConfig with name ultrahook-<some_subdomain>.

Webhook Configuration

When you register at http://www.ultrahook.com, you will choose webhook namespace and you will get API key. As you can see above, you need to provide your API key to the deployment. Then you need to choose a subdomain - so that you can use your namespace for multiple destinations. The generated webhook URL will then look like

http://<some_subdomain>.<namespace>.ultrahook.com

Which means that if your OpenShift URL is https://my.openshift.com (which is what you put in for ULTRAHOOK_DESTINATION) and your build config webhook looks like (generated by OpenShift)

https://my.openshift.com/oapi/v1/namespaces/somenamespace/buildconfigs/mybuild/webhooks/secret101/github

what you paste in Github webhook configuration will look like

http://<some_subdomain>.<namespace>.ultrahook.com/oapi/v1/namespaces/somenamespace/buildconfigs/mybuild/webhooks/secret101/github

Local build

Build locally as:

s2i build --copy . centos/ruby-24-centos7 ultrahook

Run locally as:

docker run --rm -it -e ULTRAHOOK_API_KEY=<your_api_key> -e ULTRAHOOK_SUBDOMAIN=<some_subdomain> -e ULTRAHOOK_DESTINATION=<destination_url> ultrahook