Wire a Bitbucket Data Center repository to send PR + push events to
riptide-collector. Authentication is HMAC-SHA256 via BBS's native
configuration.secret; the team's secret is the bitbucket entry in
team-keys.json.
The canonical path is scripts/bitbucket_onboarding.py — manual UI
configuration is the fallback only. The script provisions the webhook
with HMAC, the correct event set, and the correct per-team URL
(/webhooks/bitbucket/{team}).
- Repo admin access to the Bitbucket repository (or use the script with a REPO_ADMIN token).
- The riptide-collector base URL for your environment (ask the platform team).
- Your team's Bitbucket HMAC secret — the value stored under
<team>.bitbucketinteam-keys.json. The platform team hands it out during onboarding (seeonboarding-a-team.md). This secret authenticates Bitbucket webhooks only — the team's ArgoCD / Jenkins bearers are separate values.
export BITBUCKET_TOKEN=... # repo-admin REST token
export RIPTIDE_TEAM_KEY=... # team's `bitbucket` HMAC secret
uv run python scripts/bitbucket_onboarding.py path/to/team-config.jsonThe script is idempotent (rerun after edits), supports --dry-run and
--remove, and surfaces every diff before applying. See
scripts/bitbucket-onboarding.example.json for the input shape.
- Repository settings → Webhooks → Add webhook.
- Title:
riptide. - URL:
https://riptide-collector.<env>.example.com/webhooks/bitbucket/<team>— note the trailing/<team>segment; team identity is read from the path. - Status: Active.
- Skip certificate verification: leave off.
- Secret: paste the team's
bitbucketHMAC secret (theRIPTIDE_TEAM_KEYvalue). BBS uses this to sign each delivery. - Triggers — select:
- Repository: Push
- Pull request: Opened, Source branch updated, Modified, Approved, Unapproved, Needs work, Reviewer updated, Merged, Deleted, Comment added
- Save.
The Modified trigger is required for DX Core 4 pickup-time accuracy on
PRs opened as drafts: BBS emits pr:modified on title / description /
target / draft changes, and the parser keeps only the draft→ready flips
(re-typed as a synthetic pr:ready_for_review row) — that's the
clock-start signal for the pickup metric documented in the README. The
Reviewer updated trigger covers silent reviewer-status changes
(adding / removing reviewers without a comment) that also feed the
pickup metric.
Do not use the Custom headers field for auth and do not populate
the top-level credentials block via REST — BBS DC silently drops
credentials.password on REST POST/PUT.
- Trigger a small event (e.g., push a commit to a PR).
- Check the collector logs:
oc logs -n riptide deployment/riptide-collector --tail=50 | grep bitbucket_event_received - You should see a line with the
delivery_id,event_type,repo, andteammatching what you triggered.teamis the segment from the webhook URL.
| Symptom | Likely cause |
|---|---|
Bitbucket shows 401 with Invalid signature. |
Wrong/missing HMAC secret in BBS, or wrong team segment in the URL. Re-run the onboarder, which always rewrites the secret (BBS redacts it on read-back). |
Bitbucket shows 422 |
Malformed payload — open an issue with the delivery UUID |
| No log line at all | Webhook URL wrong, or network policy blocks Bitbucket → cluster |