Last updated Oct 12, 2021

Getting started

The APIs for creating extension points are based on the React framework and Atlaskit, meaning you can only use them if you're developing with React.

A framework agnostic solution is being designed and will be available on a future release.

For this tutorial, you will be creating an extension point on a page in Bitbucket Server 7.x.

The Bitbucket Server team provides a template to create a Bitbucket Plugin with all the tools already configured for you, including Client-side Extensions (CSE).

You can grab a copy by cloning the Bitbucket CSE template:

1
2
git clone git@bitbucket.org:atlassianlabs/bitbucket-client-side-extensions-template.git

If you want to create extension points on your own project, follow the guide on how to setup CSE schema-loader before you get started.

Installing the requirements

You will need to install:

Starting Bitbucket

To install all the dependencies for the first time, run:

1
2
atlas-package -DskipTests

To start Bitbucket from your project, run:

1
2
atlas-run -DskipTests

Once the Bitbucket starts, you should see this message in the terminal:

1
2
bitbucket started successfully in XYZs at http://localhost:7990/bitbucket

Now, you can open the browser and navigate to http://localhost:7990/bitbucket

Default credentials

The local instance of Bitbucket requires you to log in using those credentials:

  • username: admin
  • password: admin

Developing

The template comes with watchmode and hot reload configured for your front-end code. You can run the CSE watch server by executing:

1
2
npm start

Working directory

You will be working on a blank page created with CSE page extensions, and will create an extension point named extension.points.tutorial.

It is not necessary to use CSE page extensions to create an extension point. This guide uses them to provide a clean environment for working with extension point APIs.

All the exercises are going to be developed inside this directory:

  • src/main/my-app/extensions/extension-points-tutorial/

There you will find:

  • ./extension-points-page.jsx: the blank page where you are going to create your extension point and render the extensions
  • ./extensions/: a set of extensions that you're going fetch and render throughout the guides.

Once you install and start Bitbucket Server from the template, you can head to the tutorial page and should see the title extension.points.tutorial

You're ready!

You're now ready to create your first extension point!

Rate this page: