Custom Webhook
Last updated
Last updated
thatthatSuppose users want to create a webhook for custom use cases, like they want a pipeline or release to be triggered based on the options that they desire so what they can do is they can create a Generic webhook. This only requires a POST request to be sent on the URL provided and then the pipeline or release will be triggered. Steps to create a Generic Webhook for release
Pre-requisites:
An Active cluster
A Release that has been created from the Release Templates section
Steps
On click of the create webhook button, a modal window appears in which we can enter the details for webhook creation
After this select the webhook type as Generic
After this select the release type as the release
4. After the trigger type release has been selected, select the release which needs to be triggered on the success of the POST request
Once all the options are selected, the map parameters button will be enabled users can click on the button to move to the next step
On moving to the next step, users can select the desired options for mapping the parameters. Once all the options are chosen users can click on save to create the Generic webhook.
The webhook once created will be shown in the webhook list view
To get the URL of the generic webhook that is created, click on the edit button of the webhook
Now we can use this URL for sending POST requests, after completion of any action we can send a POST request to this URL and the selected Release will be triggered.
Pre-requisites:
An Active cluster
A microservice
Follow the same steps until Step 2 of Creating Webhooks for release
Steps:
Select the trigger type as pipeline
Now select the pipeline that needs to be triggered
3. After selecting the pipeline, select the environment in which the webhook needs to be created
Remember to select the environment the same in which the cluster has been created 4. After selecting the environment, users will be shown an option to select the cluster
Once the cluster has been selected, select the microservice
After selecting the microservice, users can move to the Map parameters step, to select the run parameters for the pipeline
In Map parameters, users can select all the options as they desire
Once all this is done, users can click on the Save button to create the webhook for the pipeline
The created webhook will be shown in the webhook list view
To get the URL of the generic webhook that is created, click on the edit button of the webhook
Now we can use this URL for sending POST requests, after completion of any action we can send a POST request to this URL and the selected Release will be triggered.
This is how webhooks are created for Generic use cases, where we can just send a POST request to the URL and the desired pipeline/release will be triggered.