# Bitbucket plugin

Bitbucket plugin
================

You can build, test, and deploy with unlimited private or public space with Bitbucket®. It is one tool for all your professional needs - from code to deployment. The Bitbucket plugin integrates with the [Bitbucket REST API](#_bitbucket_rest_api_support) to provide support for [Bitbucket webhooks](#_bitbucket_webhook_support).

Only the Bitbucket Cloud is supported.

While the [Git plugin](/docs/cloudbees-cd-plugin-docs/latest/ec-git/) provides the core functionality for managing Git repositories and associated data, the Bitbucket plugin provides the following, additional functionality:

  

Supported features

Git plugin

Bitbucket plugin

[Approve pull request](/docs/cloudbees-cd-plugin-docs/latest/ec-bitbucket/create-procedures#_approve_pull_request)

[Clone](/docs/cloudbees-cd-plugin-docs/latest/ec-git/create-procedures#_clone)

[Commit](/docs/cloudbees-cd-plugin-docs/latest/ec-git/create-procedures#_commit)

[Create pull request](/docs/cloudbees-cd-plugin-docs/latest/ec-bitbucket/create-procedures#_create_pull_request)

[Delete branch](/docs/cloudbees-cd-plugin-docs/latest/ec-git/create-procedures#_deletebranch)

[Merge pull request](/docs/cloudbees-cd-plugin-docs/latest/ec-bitbucket/create-procedures#_merge_pull_request)

[Configure polling triggers](/docs/cloudbees-cd/latest/triggers/polling-triggers)

[Post commit status](/docs/cloudbees-cd-plugin-docs/latest/ec-bitbucket/create-procedures#_post_commit_status)

[Pull](/docs/cloudbees-cd-plugin-docs/latest/ec-git/create-procedures#_pull)

Reporting data: [Code commit](/docs/cloudbees-cd-plugin-docs/latest/ec-git/collect-reporting-data)

[Webhook triggers](#_bitbucket_webhook_support)

[](#_bitbucket_rest_api_support)Bitbucket REST API support
----------------------------------------------------------

The Bitbucket plugin has been tested with [Bitbucket Cloud REST API v2](https://api.bitbucket.org/2.0/).

[](#_bitbucket_webhook_support)Bitbucket webhook support
--------------------------------------------------------

The Bitbucket plugin provides the ability to automate the launch of the CloudBees CD/RO runtimes for:

*   Pull requests
    
*   Push events
    

For more information, refer to [Configure webhook triggers](/docs/cloudbees-cd/latest/triggers/webhook-triggers).

### [](#_supported_runtime_values_according_to_the_event_type)Supported runtime values according to the event type

When the procedure or pipeline is started by a webhook event, additional properties are available under the `/myWebhook` property sheet. These properties are parsed from the event payload, which itself is saved under `/my(Job|PipelineRuntime|etc.)/webhookData`. The list of parsed properties depends on the event type. In some cases, the event payload may not contain the data for a property, and it is missing.

The branch names in the **Include Branches** and **Exclude Branches** parameters are patterns; the value `main` corresponds to any branch that contains `main` (for example, `test-main-data`). To specify the exact branch, you must use line start and line end symbols (for example, `^main$`).

Table 1. Supported runtime values according to the event type   

Runtime property

Pull request event

Push event

branch

commitAuthorEmail

commitAuthorName

commitId

commitMessage

eventType

repository

webhookData/author

webhookData/body

webhookData/branch

webhookData/number

webhookData/state

webhookData/title

webhookData/url