You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EXPERIMENTAL: This is a gateway for exposing Trello-compatible webhooks to
Brigade. It is not ready for production use (namely, the payload validation
is not done yet).
To use this gateway, you will need:
A Kubernetes cluster
running Brigade
with Helm
A Trello account, along with the developer token and apikey
You may also want to enabled RBAC with --set rbac.enabled=true.
Once the gateway is installed and exposed on a public IP address, you will need
to register a Webhook gateway with Trello. This is a manual process
described in the Trello docs.
The webhook URL should take the form:
https://<GATEWAY_IP_OR_NAME>/trello/<PROJECT_ID>
(substitute https if your ingress or service is configured for TLS)
Note that the PROJECT_ID is of the form brigade-XXXXXXXXXXXXXXXXXXXX, not the
human-readable name.
We highly recommend registering a webhook for a single board until you get
the hang of using this gateway.
There is a highly experimental "generic webhook" implementation in this gateway
as well. You can use this to run arbitrary webhooks, but it is insecure by
design (since it does not seek to validate the identy of the sender or the
payload). It is at https://<HOST>/webhook/<PROJECT_ID>.
Note: While the above URLs respond to GET and HEAD requests, it will always
respond with a no-op 200-level request. Only POST can be used to actually
trigger an event.
Writing a Brigade File
This gateway emits two Brigade events:
trello: The event triggered any time a Trello event fires.
webhook: (EXPERIMENTAL) Triggered if you use the experimental /generic/<PROJECT>
endpoint. This hook is considered untrusted and should be treated with
utmost caution.
A brigade.js that makes use of the trello hook can be found in the repository.
In a nutshell, though, they look like this:
events.on("trello",(e,p)=>{// Parse the JSON payload from Trello.varhook=JSON.parse(e.payload)// Now you can go about your business.})