Chapter 6. Automatically rebuilding updated applications using webhooks
You can configure an OpenShift application to automatically rebuild and redeploy whenever updates are made to the Git repository that contains the application code. This ensures that the latest working version of your application is always available.
- An OpenShift application created using a GitHub repository as a source.
- Permissions to change webhook settings in the GitHub repository.
- In OpenShift Dedicated, change into the Developer perspective and set the Project dropdown to the appropriate project.
- Click Topology and click on your application to view the application details pane.
Under Builds, click the name of the build configuration, marked with
BC, to view the build configuration page.
- Under Webhooks, locate the entry for GitHub and click Copy URL with Secret.
- Navigate to your project page in GitHub and click Settings.
- Click Webhooks → Add webhook.
Enter the following details on the Add webhook page:
- Paste the copied URL with secret into the Payload URL field.
Set Content type to
- Leave all other options as the default.
- Click Add webhook.
- Make an update to your application code and verify that the application rebuilds and deploys correctly.