Incoming Webhook URL
When an Incoming Webhook integration is created, it generates a unique webhook URL that can be used to post information into any resource that is associated with the integration.
Usage
Incoming Webhook can be used in the Incoming Webhook resource.
The Incoming 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 |
---|---|
res_<resource-name>_webhookName_authType | Select hmac, basic, or authorization |
res_<resource-name>_webhookName_secret | Secret to use with hmac |
res_<resource-name>_webhookName_username | Username to use to trigger the webhook |
res_<resource-name>_webhookName_password | Password for the user |
res_<resource-name>_webhookName_authorization | Authorization to trigger the webhook |
When you add this integration directly to a step, a set of environment variables is automatically made available.
Environment variable | Description |
---|---|
int_<integration-name>_authType | Select hmac, basic, or authorization |
int_<integration-name>_secret | Secret to use with hmac |
int_<integration-name>_username | Username to use to trigger the webhook |
int_<integration-name>_password | Password for the user |
int_<integration-name>_authorization | Authorization to trigger the webhook |
Example
- This example uses an Incoming Webhook Integration named
MyIncomingWebhookIntegration
. The unique Webhook URL this integration creates can be used to post information into any resource that is associated with the integration. In this example, this integration is used in the resource namedMyIncomingWebhookResource
. To trigger theExampleStep
step, the resourceMyIncomingWebhookResource
is used as an input resource in the step. - The Pipelines DSL for this example is available in this repository in the JFrog GitHub account.
resources: - name: MyIncomingWebhookResource type: IncomingWebhook configuration: webhookName: MyIncomingWebhookIntegration pipelines: - name: ExamplePipeline steps: - name: ExampleStep type: Bash configuration: inputResources: - name: MyIncomingWebhookResource execution: onExecute: - echo "$res_MyIncomingWebhookResource_payload" | jq '.' > payload.json - read_json payload.json "LESSER_SECRET_FORMULA"