Skip to content

Bitbucket Integration

Connect Bitbucket repositories to SerOps for code change tracking and pipeline monitoring.

Prerequisites

  • Bitbucket Cloud or Bitbucket Server/Data Center
  • App Password with repository read access
  • (Optional) Webhook configuration access

Setup

Configuration is managed in Integrations.

Bitbucket Cloud

  1. In Bitbucket: Personal Settings → App passwords
  2. Create an App Password with permissions:
  3. Repositories: Read
  4. Pipelines: Read (for CI/CD)
  5. Webhooks: Read and write (optional, for auto-setup)
  6. In SerOps: Integrations
  7. Click + Add Integration and select Bitbucket
  8. Enter:
  9. Name: Identifier (e.g., "Team Bitbucket")
  10. Bitbucket URL: Leave blank for bitbucket.org
  11. Username: Your Bitbucket username (not email)
  12. App Password: The app password created above
  13. Click Test Connection to verify
  14. Click Save

Bitbucket Server / Data Center

  1. In Bitbucket Server: Manage Account → HTTP Access Tokens
  2. Create a token with:
  3. Repository read
  4. Project read
  5. In SerOps: Enter your server URL (e.g., https://bitbucket.company.com)

What Gets Synced

Data Description Method
Commits Recent commits with diffs Webhook + API
Pull Requests PR status and metadata Webhook
Pipelines Bitbucket Pipelines status Webhook

Note: Bitbucket Deployments tracking is not currently supported. Use pipelines for deployment visibility.


Webhook Configuration

Automatic Setup

SerOps auto-generates a webhook secret when you create a CI/CD binding. To register the webhook with Bitbucket automatically:

  1. Navigate to the service's CI/CD binding
  2. Click Setup Webhook (or call POST /api/projects/cicd-bindings/{id}/setup-webhook/)

Manual Setup

  1. In SerOps, find the CI/CD binding for your service and copy the Webhook URL
  2. URL format: https://your-serops.com/api/webhooks/bitbucket/{binding_id}/
  3. In Bitbucket: Repository Settings → Webhooks
  4. Add webhook:
  5. Title: SerOps Integration
  6. URL: The binding-specific URL from step 1
  7. Triggers:
    • ✅ Repository: Push
    • ✅ Pull Request: Created, Updated, Merged
    • ✅ Build status: Created, Updated (for Pipelines)

Workspace Configuration

For Bitbucket Cloud, you may need to specify the workspace:

Workspace: my-team
Repository: my-repo
Full path: my-team/my-repo

SerOps will prompt for workspace when listing repositories.


Troubleshooting

Issue Solution
"Invalid credentials" Ensure username (not email) and app password are correct
"Repository not found" Check workspace/repo path format
"Rate limit exceeded" Use team-level credentials or wait
"SSL error" (Server) Add Bitbucket Server CA to trust store