Official Jenkins plugin · Bitbucket DC & Cloud

Trigger Jenkins from Bitbucket without a firewall change

Bitbucket posts each push and pull request to one public Webhook Relay URL. The plugin inside Jenkins connects out and hands each webhook to the trigger you already use. Jenkins keeps no public address, and nobody opens an inbound port.

Free plan · No credit card · SOC 2 Type II · Jenkins 2.479.1+

Buying for a company? Talk to sales

One public URL in. One outbound connection out. Nothing else exposed.

Safe on company infrastructure

  • Outbound only

    No inbound port, no public IP. Works behind NAT and corporate proxies.

  • What we store

    Each webhook and the response Jenkins returned, for delivery logs, retries and replay.

  • Official Jenkins plugin

    Published in the Jenkins plugin index, open source.

    plugins.jenkins.io ↗Source ↗

  • SOC 2 Type II

    Independently audited controls.

    Security details →

One URL, no network ticket

Bitbucket only has to reach a single HTTPS endpoint. Jenkins only has to make an outbound connection.

Exposing Jenkins to Bitbucket

  • Open an inbound port to the Jenkins controller
  • Allow-list Bitbucket's webhook source addresses
  • Run and patch a reverse proxy in front of Jenkins
  • Get the firewall change through security review

With the Webhook Relay plugin

  • Jenkins makes one outbound connection
  • Nothing new is reachable from the internet
  • Deliveries are logged and retried for up to 30 days
  • Nothing for the firewall team to approve

Nothing else reachable

Jenkins keeps no public address, so /cli, the script console and the setup wizard, the endpoints behind exploited CVEs like CVE-2024-23897, can't be reached from outside.

One bucket, many repositories

Put ?token=<job> on each repository's webhook URL. The query string reaches Jenkins unchanged, so one bucket serves every project.

Every delivery logged

Each webhook is stored with the response Jenkins returned, retried for up to 30 days with durable delivery, and replayable from the logs.

Two setups this solves

The same setup covers self-managed Bitbucket and the move to Bitbucket Cloud.

Bitbucket Data Center and Jenkins on different networks

Bitbucket lives in one zone, Jenkins in another (an isolated build network, another VPC, a second site). As long as Bitbucket can make outbound HTTPS calls, it can trigger Jenkins without a route between them.

Moving from Bitbucket Server to Bitbucket Cloud

Bitbucket Cloud can't reach a Jenkins on your private network. Point the Cloud webhooks at the same bucket URL, and Jenkins stays where it is. Only the JSONPath expressions change, because the two payloads differ.

Works with the Bitbucket trigger you already use

Your jobs stay as they are. Webhook Relay only changes how the webhook reaches Jenkins.

Generic Webhook Trigger

Token-based job selection: add ?token=<job> to each repository's webhook URL. One bucket, any number of jobs.

Jenkins endpoint

/generic-webhook-trigger/invoke

Bitbucket Branch Source

Multibranch pipelines and pull request builds. Add an internal output with the full URL and the plugin delivers there.

Jenkins endpoint

/bitbucket-scmsource-hook/notify

Bitbucket plugin

The push trigger, unchanged. On Bitbucket Server it is fed by a Post-Webhook rather than a plain webhook.

Jenkins endpoint

/bitbucket-hook/

Also building from GitHub or GitLab? Same plugin, same bucket. See the GitHub setup

Set up in three steps

Requires Jenkins 2.479.1 or newer. No separate agent to install or keep running.

  1. 1

    Install the plugin

    Manage Jenkins → Plugins → search Webhook Relay. Paste your API key and secret, enter a bucket name, choose the Generic Webhook Trigger preset and save.

    Jenkins/Manage Jenkins/System/Webhook Relay

    API Key

    Concealed

    API Secret

    Concealed

    Bucket name

    jenkins-plugin

    SCM Webhook Preset

    Generic Webhook Trigger (generic-webhook-trigger/invoke)

    Connection Status

    Subscribed — subscribed to buckets: jenkins-plugin

  2. 2

    Add the webhook in Bitbucket

    In the plugin settings, click Get Webhook URL and add ?token=<your-job-token>. Then in Bitbucket, open Repository settings → Webhooks, paste it and select push and pull request events.

    Jenkins/Manage Jenkins/System/Webhook Relay

    Webhook URL

    Get Webhook URL

    Paste this URL into your GitHub/GitLab/Bitbucket/Gitea repository webhook settings:

    https://<id>.hooks.webhookrelay.com

  3. 3

    Push a commit

    The webhook travels from Bitbucket through your bucket to Jenkins, and the job with that token starts. Check the bucket logs for the response Jenkins returned.

    Jenkins build #1 completed, triggered by a webhook delivered through Webhook Relay
    A real build started by a webhook delivered through the plugin.

Start free, or buy through procurement

Try it on one pipeline

Free$0
150 webhooks a month, enough for a test pipeline
Business$79.99/mo
60,000 webhooks a month, long log retention, priority support

7-day money-back guarantee on paid plans.

Buying for a company?

  • Annual plans paid by invoice and purchase order
  • Help with your security review
  • Vendor onboarding paperwork

Questions

Does this work with Bitbucket Data Center (Server)?

Yes. The setup is the same as for Bitbucket Cloud, but the payload is different: the branch is at changes[0].ref.displayId, the repository at repository.slug, and a push arrives with X-Event-Key: repo:refs_changed instead of repo:push. Change the JSONPath expressions in your Generic Webhook Trigger job to match.

What network access is needed?

Bitbucket needs to make outbound HTTPS requests to your bucket's public Webhook Relay URL. Jenkins needs an outbound connection to Webhook Relay. Nothing has to connect in to Jenkins, and Bitbucket and Jenkins don't need a route to each other.

Can one webhook URL trigger different Jenkins jobs?

Yes. Give each job its own token and put a different ?token= value on each repository's webhook, all pointing at the same bucket. Or keep one URL for every repository and attach a small Webhook Relay function that picks the token from the repository name in the payload.

What if Jenkins is restarting when a push happens?

Webhook Relay stores the webhook and Bitbucket gets a success response. With durable delivery it is retried for up to 30 days, and any request can be replayed from the logs.

Can I run an agent instead of a plugin?

Yes. The relay CLI, Docker image or Kubernetes operator can forward to Jenkins from any machine on the same network, which is useful when you can't install plugins on the controller.

Can we pay by invoice?

Yes. Annual plans can be paid by invoice and purchase order, and we help with security reviews and vendor onboarding. Use Talk to sales to request a quote.

Trigger your next build from Bitbucket

Install the plugin, add one webhook URL in Bitbucket, push a commit. Jenkins stays private.

Free plan · No credit card required · 7-day money-back guarantee on paid plans