Page History
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 |
---|---|
res_<resource-name>_webhookName_webhookURL | Webhook URL to receive the outgoing payload |
res_<resource-name>_webhookName_authType | AuthType: hmac, basic, or authorization |
res_<resource-name>_webhookName_secret | Secret to use with hmac |
res_<resource-name>_webhookName_username | Username to use for invoking the webhook |
res_<resource-name>_webhookName_password | Password for the user |
res_<resource-name>_webhookName_authorization | 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 |
---|---|
int_<integration-name>_webhookURL | Webhook URL to receive the outgoing payload |
int_<integration-name>_authType | AuthType: hmac, basic, or authorization |
int_<integration-name>_secret | Secret to use with hmac |
int_<integration-name>_username | Username to use for invoking the webhook |
int_<integration-name>_password | Password for the user |
int_<integration-name>_authorization | 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.
Code Block | ||||
---|---|---|---|---|
| ||||
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"
|