Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >

Search





An Outgoing Webhook Integration is used by JFrog Pipelines to send webhook to an external system to trigger events on that system.

Creating an 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


Page Contents

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 variableDescription
res_<resource-name>_webhookName_webhookURLWebhook URL to receive the outgoing payload
res_<resource-name>_webhookName_authTypeAuthType: hmac, basic, or authorization
res_<resource-name>_webhookName_secretSecret to use with hmac
res_<resource-name>_webhookName_usernameUsername to use for invoking the webhook
res_<resource-name>_webhookName_passwordPassword for the user
res_<resource-name>_webhookName_authorizationAuthorization 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>_webhookURLWebhook URL to receive the outgoing payload
int_<integration-name>_authTypeAuthType: hmac, basic, or authorization
int_<integration-name>_secretSecret to use with hmac
int_<integration-name>_usernameUsername to use for invoking the webhook
int_<integration-name>_passwordPassword for the user
int_<integration-name>_authorizationAuthorization to use for invoking the webhook





Example

  • This example uses an Outgoing Webhook Integration named MyOutgoingWebhookIntegration, which is used in the resource named My_OutHook_formurl_Resource. The step my_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"
  • No labels
Copyright © 2021 JFrog Ltd.