Last updatedJan 5, 2018
Improve this page

Beginner guide to Bitbucket Server plugin development

Welcome to plugin development for Bitbucket Server. You will build a plugin with the same framework used in Jira and Confluence Server. If you have written Atlassian plugins before then you can use that knowledge to start from our experienced plugin development guide. Otherwise, the tutorials below provide a good introduction.

Note, these guides are for developing plugins to run on Server instances you host yourself. If you want to create an app for a cloud instance hosted by Atlassian then checkout our cloud plugin development tutorials.

Tutorials

Below are tutorials for different types of behavior in Bitbucket Server. Read through their summaries and choose one that represents something you are interested in or know about. Please note, all tutorials require you to install the Atlassian Plugin SDK.

After completing any of these tutorials you will have learned to do the following:

  • Generate a Bitbucket Server plugin using the Atlassian Plugin SDK
  • Use various Bitbucket Server services
NameDescriptionLearnings
Adding a link item in the pull request overview panelCreate a plugin that puts custom content on the Overview tab of a pull request
  • Find plug-in points in the Bitbucket Server UI for adding content
  • Define a Client Web Panel
  • Use custom CSS and JS in your panel with Web resource dependencies
Controlling when pull requests can be mergedOnly allow repository administrators to merge pull requests by writing a plugin containing a Merge Request Check
  • Implement a repository merge check in Java
  • Declare a repository merge check in your plugin's atlassian-plugin.xml
  • Internationalize your plugin's messages
Decorating the user accountWrite a plugin that decorates a user's account management page with custom content
  • Create a servlet that extracts an account management page
  • Add a new tab to the account management page
  • Decorate the account management page using Soy to render its content
Decorate the user profile pageWrite a plugin that adds custom content to the public user profile
  • Create a servlet that extracts a user's profile
  • Add a new tab to the user profile page
  • Decorate the user profile using Soy to render its content

Next steps

Now you are ready to start developing your own plugins with the Atlassian plugin framework. If you would like to keep learning about plugin development for Bitbucket Server, continue with the following: