A webhook is a custom callback over HTTP used to setup communication between applications. They provide a way to automatically notify other applications when an event has occurred in your application in the form of an HTTP post payload. This eliminates the need to poll your application to check for new events – the application will alert you when there's something new! Webhooks in FlexDeploy can be used to trigger actions in FlexDeploy based on events happening in other applications, thus eliminating some manual actions. For example, you can setup a webhook to build a project immediately after a push occurs in your SCM. This is just one example, and FlexDeploy's model offers flexibility in what you can accomplish with webhooks.
Overview
Webhooks can be accessed from Administration → Integrations → Webhooks. This page will show all the webhook functions configured in FlexDeploy. Each function contains a Groovy script which will be executed whenever an event is received at the listed URI from the configured provider. Webhook Providers can be accessed from the button on the functions page. Click to view the results of any received webhooks, or to resubmit them.
See more details about each webhook topic below:
Common issues/FAQ
- findProjectsForChange/findPackagesForChange isnt finding my projects
- The most common reason your projects/packages are not being found is the Webhooks Enabled flag is not checked on the project
- Ensure the repository name configured in your integration instance in FlexDeploy matches the repository name received from the webhook (case insensitive).
- If a sparse checkout folder is configured on your project your project will only be detected for a change if one of the modified files from the push event is contained in the sparse checkout folder
- For example - If you received a push event for a changed file /content/project1/dist/index.html. A project with sparse checkout 'content/project2' would not be returned whereas a project with sparse checkout 'content/project1' would be
- How do I create a new Release Snapshot from a webhook build?
- The simplest way is to simply configure a Snapshot Schedule on your release. When the schedule runs it will find the newly built project version which resulted from the webhook.
- A function also exists 'createSnapshot' which can be used within a webhook function.