Webhook

by drone-plugins

Use the Webhook plugin to notify services via Webhook when a build completes. You will need to supply Drone with outgoing Webhook URLs. The below pipeline configuration demonstrates simple usage:

pipeline:
  webhook:
    image: plugins/webhook
    urls: https://your.webhook/...

Example configuration with multiple URLs:

pipeline:
  webhook:
    image: plugins/webhook
-   urls: https://your.webhook/...
+   urls:
+     - https://your.webhook/...
+     - https://your.other.webhook/...

Example configuration with Basic Authentication:

pipeline:
  webhook:
    image: plugins/webhook
    username: myusername
    password: mypassword
    urls: https://your.webhook/...

Example configuration with custom body:

pipeline:
  webhook:
    image: plugins/webhook
    username: myusername
    password: mypassword
    urls: https://your.webhook/...
+   content_type: application/json
+   template: |
+     {
+       "owner": "{{ repo.owner }}",
+       "repo": "{{ repo.name }}",
+       "status": "{{ build.status }}",
+     }

Example configuration to debug response:

pipeline:
  webhook:
    image: plugins/webhook
    username: myusername
    password: mypassword
    urls: https://your.webhook/...
+   debug: true

Secret Reference

webhook_urls
Payload gets sent to this list of URLs
webhook_username
Username for basic auth
webhook_password
Password for basic auth

Parameter Reference

urls
Payload gets sent to this list of URLs
username
Username for basic auth
password
Password for basic auth
method
HTTP submission method, defaults to POST
content_type
Sontent type, defaults to application/json
template
Custom template for webhook
headers
Map of custom headers
skip_verify
Skip SSL verification
debug
Enable debug information

¿Hay algún error en esta página? Por favor, háganoslo saber o edite esta página.