When deployed to an OpenShift server, Hive can be automatically built and deployed using a BuildConfig and a GitHub Webhook.
- Modify the
config/builconfig/hive-buildconfig.yamlmanifest by adding a secret string in the placeholder for a webhook secret. If setting up for your own fork, replace the git repository URL with your own fork's URL. - Apply the manifests in
config/buildconfig/to the namespace where the Hive operator is installed (typically thehivenamespace). - Setup a deployment trigger using the
oc set triggerscommand:oc project hive oc set triggers deployment/hive-operator --from-image=hive:latest --containers hive-operator
-
Obtain the webhook URL for the BuildConfig by using
oc describeoc project hive oc describe buildconfig/hiveThe description will contain a
Webhook GitHub URL, copy that URL and replace the<secret>placeholder with the secret string you entered in the buildconfig manifest. -
Go to the GitHub repository, click on
Settingsand navigate toWebhooks. -
Click on
Add Webhook -
Enter the URL from the webconfig in the
Payload URLfield -
Select
application/jsonin Content Type -
Leave Secret blank
-
If not using valid certificates for your cluster, select to Disable SSL Verification
-
Click on
Add webhook