Send Bitbucket events into a Brigade pipeline.
This is a Brigade gateway that listens to bitbucket webhooks event stream and triggers events inside of Brigade.
- Have a running Kubernetes environment
- Setup Helm
- Setup Brigade core
Clone Brigade Bitbucket Gateway and change directory
$ git clone https://github.com/brigadecore/brigade-bitbucket-gateway
$ cd brigade-bitbucket-gateway
Helm install brigade-bitbucket-gateway
note name and namespace (something important about brigade core)
$ helm install --name bb-gw ./charts/brigade-bitbucket-gateway
Add this project as a helm repo
$ helm repo add bb-gw https://brigadecore.github.io/brigade-bitbucket-gateway
$ helm install -n bb-gw bb-gw/brigade-bitbucket-gateway
You must have the Go toolchain, make, and dep installed. For Docker support, you will need to have Docker installed as well. See more at Brigade Developers Guide From there:
$ make build
To build a Docker image
$ make docker-build
BitBucket Gateway | Brigade Core |
---|---|
v0.10.0+ | v0.10.0+ |
v0.1.0 | v0.9.0- |
The Default URL for the BitBucket Gateway is at :7448/events/bitbucket/
. In your BitBucket project, go to Settings -> Webhooks. Depending on how you set up
your Kubernetes and the BitBucket Gateway will determine your externally accessable host/IP/Port. Out of the box the gateway sets up as LoadBalancer; use the host/Cluster IP and check the BitBucket Gateway Kubernetes Service for the external port (something like 30001).
Enter that IP/Port and URL at the Webhook URL.
Rather than supplying a Shared Secret like GitHub/GitLab, you must extract the X-Hook-UUID
from the BitBucket Webhook created. Store this value as the Brigade Project values.yaml sharedSecret
property.
Check the boxes for the Trigger events to publish from the BitBucket instance. SSL is optional.
tl;dr: Bitbucket Gateway produces 16 events:
push
,
repo:commit_comment_created
,
repo:commit_status_created
,
repo:commit_status_updated
,
issue:created
,
issue:updated
,
issue:comment_created
,
pullrequest:created
,
pullrequest:updated
,
pullrequest:approved
,
pullrequest:unapproved
,
pullrequest:fulfilled
,
pullrequest:rejected
,
pullrequest:comment_created
,
pullrequest:comment_updated
,
pullrequest:comment_deleted
and two not supported: repo:fork
, repo:updated
This project welcomes contributions and suggestions.
MIT