Last updated Jul 27, 2021

Rate this page:

Experienced guide to Bitbucket Server plugin development

Welcome to the experienced plugin development guide for Bitbucket Server. This guide assumes you are familiar with the Atlassian Plugin Framework and have installed the Atlassian Plugin SDK. If you are still new to plugin development for Atlassian products then start with the beginner guide to Bitbucket Server plugin development.

We have two options for you to follow: start from working code by forking an existing plugin, or begin completely from scratch.

Forking an existing plugin

Choose an example plugin that most resembles what you want to achieve and begin modifying it for your use case.

  1. Install the Atlassian Plugin SDK.
  2. Create a Bitbucket account.
  3. Browse our collection of open source Bitbucket Server plugins and fork it into your personal account. You can choose whether to make your fork public or private.
  4. Modify the plugin to suit your needs.

Starting from scratch

Use our CLI tool to generate the plugin structure then begin developing your own behavior from a clean slate.

  1. Install the Atlassian Plugin SDK.
  2. Run atlas-create-bitbucket-plugin from a command prompt window and follow the prompts to create your plugin.
  3. Run atlas-create-bitbucket-plugin-module from the root directory of your plugin or hand edit your atlassian-plugin.xml file to add additional modules to your plugin.
  4. Run atlas-run from the root directory of your plugin to start Bitbucket Server with your plugin installed. See the Atlassian Plugin SDK Documentation for more information on developing and debugging your plugin.
  5. Modify the plugin to suit your needs.

You can see the above commands in action in this 30 minute video tutorial.

Note: This tutorial predates the renaming of the product to "Bitbucket Server" from "Stash", but is still a useful resource.

Next steps

To keep learning about plugin development for Bitbucket Server, continue with the following:

Rate this page: