Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Developer Guide

Austin Hacker edited this page Jun 22, 2019 · 5 revisions

Environment Setup

Bitbucket Setup

  • Install the Atlassian Plugin SDK. If you have the sdk already installed, run atlas-version and make sure the AMPS version is >= 8.0.0.
  • Install npm
  • While in the root directory of this repo, run atlas-run -Dmaven.javadoc.skip=true.
  • Wait until you see bitbucket started successfully in XXXs at <url>.
  • Go to the given url (usually localhost:7990/bitbucket) and login with admin as username and password.

atlas-run will package the plugin and auto-install it on the Bitbucket instance. If you make any more changes after starting a Bitbucket instance, simply run atlas-mvn package -Dmaven.javadoc.skip=true and from Global Settings > Manage Addons you can upload the new parameterized-builds-X.X.X.jar found in the target directory. The -Dmaven.javadoc.skip=true is currently needed due to an AMPS issue. Do not run atlas-mvn clean because this can corrupt the Bitbucket instance.

Jenkins Setup

I typically use docker to manage my Jenkins instance. However, this is really dependent on personal preference. If you have a stable Jenkins instance available, you can always use that. Just be careful what you trigger. If you want to use docker, follow these steps:

From a local Bitbucket instance, you can connect to a dockerized Jenkins instance using localhost:. However, from the dockerized Jenkins instance, Jenkins will not recognize Bitbucket running on localhost. This is relevant when testing multibranch pipelines as they need to scan the Bitbucket repository that is being triggered. Instead, you will need to determine the ip address docker is running on. For instance if your local IP is 172.17.0.1 and the git url you'd use to clone your repo is on http://admin@localhost:7990/bitbucket/scm/project_1/rep_1.git then the url you'd actually use in would be http://admin@172.17.0.1:7990/bitbucket/scm/project_1/rep_1.git. Newer versions of docker can also use host.docker.internal as the hostname.

Additional Resources

API References

Bitbucket Java API: https://docs.atlassian.com/bitbucket-server/javadoc/6.3.0/api/reference/packages.html

Bitbucket Java SPI: https://docs.atlassian.com/bitbucket-server/javadoc/6.3.0/spi/reference/packages.html

Bitbucket Javascript API: https://docs.atlassian.com/bitbucket-server/docs/6.3.0/reference/javascript/

Bitbucket HTML Items: https://docs.atlassian.com/aui/8.3.3/docs/

Soy Templates: https://github.com/liferay/soy-cheat-sheet

Helpful guides

Guide to adding Bitbucket tabs and buttons: https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/pull-request-overview/

For Users

For Contributors

Clone this wiki locally