An Outgoing Webhook Integration is used by JFrog Pipelines to send webhook to an external system to trigger events on that system.
Creating a Webhook Integration
You can add this integration by following steps on the Managing Pipelines Integrations page.
Here is the information you need to create this integration:
Name -- choose a friendly name for the integration
Webhook URL -- URL of endpoint to receive the payload
Authorization Type -
select hmac, basic, or authorization
Secret -- secret to use with hmac authType
User Name -- username to use with basic authType for invoking the webhook
Password -- password for the user to use with basic authType
Authorization -- authorization to use with authorization authType for invoking the webhook in the external system
Usage
Outgoing Webhook integration can be used in the Outgoing Webhook resource.
The Outgoing Webhook integration can also be added directly to a step in the integrations
section.
Default Environment Variables
When you create a resource with this integration, and create a step that uses it, a set of environment variables is automatically made available.
Environment variable | Description |
---|---|
| Webhook URL to receive the outgoing payload |
| AuthType: hmac, basic, or authorization |
| Secret to use with hmac |
| Username to use for invoking the webhook |
| Password for the user |
| Authorization to use for invoking the webhook |
When you add this integration directly to a step, a set of environment variables is automatically made available.
Environment variable | Description |
---|---|
| Webhook URL to receive the outgoing payload |
| AuthType: hmac, basic, or authorization |
| Secret to use with hmac |
| Username to use for invoking the webhook |
| Password for the user |
| Authorization to use for invoking the webhook |
Example
This example uses an Outgoing Webhook Integration named
MyOutgoingWebhookIntegration
, which is used in the resource namedMy_OutHook_formurl_Resource
. The stepmy_send_hook_formurl
uses this resource as an output resource to send a payload to the endpoint specified in the integration.The Pipelines DSL for this example is available in this repository in the JFrog GitHub account.
Outgoing Form URL Webhook
resources: - name: My_OutHook_formurl_Resource type: OutgoingWebhook configuration: webhookName: MyOutgoingWebhookIntegration path: /url headers: content-type: application/x-www-form-urlencoded pipelines: - name: ExamplePipeline steps: - name: my_send_hook_formurl type: Bash configuration: outputResources: - name: My_OutHook_formurl_Resource execution: onExecute: - echo "hello world" - formUrlEncodedPayload="foo=bar&runNumber=$run_number&stepName=$step_name" - set_payload My_OutHook_formurl_Resource "$formUrlEncodedPayload"