Configuring a webhook in Control to trigger builds in Build
You can use the DevOps Control plugin in Build to configure a webhook that triggers builds when events such as pull request creation or merge occur in Control.
Before you begin
You must have completed the following tasks:
- Ensured that a loop is created in DevOps Loop and you have access to Control and Build with appropriate permissions.
- Created a project in Build and added the build process in the project.
- Added the control repository in Build and obtained the trigger URL that can be added as the Target URL when you want to add the webhook in Control. See Adding the Control repositories in Build.
About this task
Procedure
-
Log in to DevOps Loop.
The Home page of the Initial TeamSpace is displayed, along with the My Loops and Solutions tabs.
-
Click the Switch Teamspace icon
to
switch to the teamspace where you want to configure the webhook in
Control.
-
Navigate to Control.
The Control home page is displayed.
- Open the repository with your loop name under the organization that is same as your teamspace name
-
Click the Settings icon
in the repository.
Settings page for the repository is displayed. -
Click Webhooks.
The existing webhooks are listed.
- Click
-
Enter the following webhook configuration details:
Fields Description Target URL Trigger URL obtained in Build after creating the Control integration and adding the repository. HTTP Method Select the POST method from the drop down. POST Content Type Select application/x-WWW-form -encoded from the drop down. Secret Enter the secret details, if you have any stored secrets. Trigger On Select the required trigger events. You can select Push Events, All Events, or Custom Events. Branch filter Enter the branch name to whitelist for push, branch creation and branch deletion events, specified as glob pattern. If empty or *, events for all branches are reported. See github.com/gobwas/glob documentation for syntax. Examples:master,{master,release*}.Authorization Header Enter the bearer token or access token. Active Select the check box to get the information about triggered events will be sent to this webhook URL -
Click .
The webhook is added and a confirmation message is displayed.
Results
You have configured a webhook in Control to trigger the builds in Build whenever a pull request is created and merged.
What to do next
You can now run the build jobs and create the component versions in DevOps Deploy under the correct teamspace and loop. See Creating a component version in Deploy by using Build.
