Bitbucket Branch Source

Build GitHub release Jenkins Plugin Installs Contributors Join the chat

User Guide

Browse the user guide here

Issue tracking (where file new issues?)

At the time of writing, the Jenkins organisation let to the maintainer the choice of which issue tracker to use. Available are Github or JIRA issue tracker. For reason discussed in the Jenkins Developers Google Group the official issue tracking for this plugin is JIRA.

What means:

  • new issues must be open at JIRA
  • the Github tracker will be froozen, that means no new issues will be accepted
  • depending on the progress I expect that by the date 01/06/2025 the Github issue tracker will be disabled at all

What will happen to the issues opened in Github?

  • actual issues will be processed
  • maybe resolved
  • otherwise after 6 months, it will be manually migrated by me to JIRA if it doesn't already exist

Notes

General notes

Unlike GitHub, in Bitbucket, team admins do not have access to forks. This means that when you have a private repository, or a private fork of a public repository, the team admin will not be able to see the PRs within the fork.

Developers and DevOps notes

Classes under the packages com.cloudbees.jenkins.plugins.bitbucket.api is intended to be public api and can be used to extend functionality in other plugins. Changes in the method signature will be marked with @deprecated providing an alternative new signature or class to use. After a reasonable time (about a year) the method could be removed at all. If some methods are not intended to be used then are marked with @Restricted(NoExternalUse.class).

Classes in other packages are not intended to be used outside of this plugin. Signature can be changed in any moment, backward compatibility are no guaranteed.

When implementing a pipeline (scripted or declarative) we encourage the use of symbols instead of using the name (or fully qualified name) of the class. Symbols are safer against possible reorganization of the plugin code (classic examples: renaming the class or moving it to different packages).

Compliant example:

multibranch:
  branchSource:
    bitbucket:
      repoOwner: 'organization'
      repository: 'repository'
      credentialsId: 'bitbucket-credentials'
      traits:
        - bitbucketBranchDiscovery:
            strategyId: 1
        - bitbucketSshCheckout:
            credentialsId: 'bitbucket-ssh-credentials'

Noncompliant code example:

multibranch:
  branchSource:
    bitbucket:
      repoOwner: 'organization'
      repository: 'repository'
      credentialsId: 'bitbucket-credentials'
      traits:
        - $class: 'BranchDiscoveryTrait'
            strategyId: 1
        - $class: 'com.cloudbees.jenkins.plugins.bitbucket.SSHCheckoutTrait':
            credentialsId: 'bitbucket-ssh-credentials'

Release notes (for maintainers)

To perform a release of this plugin the minimum requirements are:

  • Maven 3.9.9
  • JDK 17
  • git 2.39.x

In a shell or Windows terminal run

mvn -B -ntp release:prepare release:perform "-Pquick-build" "-P-block-MRP"

How-to run and test with Bitbucket Server locally

Support to run Server under Windows has been dismissed since version 7.14+