Skip to content

Bitbucket Webhook Setup

Connect your Bitbucket repository to Nebion for automatic deployments.

Before You Start

  • Created a project in Nebion (how?)
  • Admin access to your Bitbucket repository
  • Webhook URL, secret, and deploy key from your Nebion project page (under Setup)
  1. Add Deploy Key

    In Nebion, copy the Deploy Key from your project page. In Bitbucket, go to Settings > Security > Access keys > Add key. Set label to Nebion Deploy Key, paste the public key, and click Add key.

  2. Create Webhook

    In Bitbucket, go to Repository settings > Workflow > Webhooks > Add webhook. Fill in:

    FieldValue
    TitleNebion Deployment
    URLPaste the Webhook URL from Nebion
    StatusActive
    SecretPaste the Webhook Secret from Nebion

    Under Triggers, select Choose from a full list of triggers, then check Pull Request: Created, Updated, Merged, and Declined. Click Save.

  3. Test It

    Create a test branch and pull request:

    bash
    git checkout -b test-nebion
    echo "test" >> README.md
    git add . && git commit -m "Test Nebion webhook"
    git push origin test-nebion

    Create a pull request in Bitbucket for this branch. In Nebion, check your project page — a new pr-{number} environment should appear. Once the deployment status shows SUCCESS, click the environment URL to verify.

WARNING

Keep the webhook secret secure. Do not commit it to your repository.

If the environment doesn't appear, check the webhook delivery history in Bitbucket under Repository settings > Webhooks > click your webhook > View requests.