Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to integrate Jira plugins with Bitbucket, SonarCube, Jacoco and Bitbucket Pipelines

The aim of the article is to make a short guide on how to setup a simple Jira plugin development process using SonarCube, Jacoco , Bitbucket and Bitbucket pipelines. All of the mentioned tools are free of charge. Bitbucket pipeline offers you 50 free minutes per month to run your pipeline.
A few words on each tool.
SonarCube is a tool for code quality inspection. It can detect bugs, code smells and security vulnerabilities in your code.
Jacoco is a code coverage tool, which lets you measure how much of your code covered by unit tests.
Bitbucket is a web-based hosting service, which is  used for managing source code.
Bitbcket pipeline is a continuous integration tool.
The tools above will help you to develop a higher quality software.
Ok. Let's move to the guide section.
1. Create Bitbucket account on
2. Setup SonarCube.
2.1. Create a SonarCube account on Use your bitbucket account to authenticate in SonarCube.
2.2. Create a new organization called tutorial in
2.3. Generate a new security token in
3. Install Atlassian SDK and create your first servlet Jira plugin.
I will make a short list of what should be done. You can find a more detailed explanation here:
3.1. Download Atlassian SDK.
3.2. Create a folder for storing your Jira plugins and execute the following command within the folder:
Enter com.atlassian.tutorial for the groupId and ciprocess for the artifactId. Then press several times “Enter” and type Y when you are asked if you want to create the plugin.
3.3. Go down to the ciprocess folder (cd ciprocess) and execute the following command:
When you are asked to choose a number you should choose 21. Number 21 means that the Servlet module will be created for you plugin. When you are asked questions about the servlet class name and package press enter. When you are asked “Show advanced setup” press N. When you are asked “Add Another Plugin Module” press N.
3.4 Run the plugin with the following command
After Jira started you can go to the following url in your browser:
And you will see the “Hello World” message.
4. Connect Jacoco.
4.1. Add the following lines into the <build><plugins> section of the pom.xml file:
4.2. Add the following lines into <properties> section of the pom.xml file:
Change sonar.login variable with the security token which you received in 2.3.
4.3. Create .gitignore file in the plugin directory with the following content
# Compiled class file

# Log file

# BlueJ files

# Mobile Tools for Java (J2ME)

# Package Files #

# virtual machine crash logs, see

# User-specific stuff:

# Sensitive or high-churn files:

# Gradle:

# CMake

# Mongo Explorer plugin:

## File-based project format:

## Plugin-specific files:

# IntelliJ

# mpeltonen/sbt-idea plugin

# JIRA plugin

# Cursive Clojure plugin

# Crashlytics plugin (for Android Studio and IntelliJ)

5. Put the source code to a bitbucket repository.
5.1. Sign in to your Bitbucket account
5.2. Create a new repository with GIT version control and name it “ciprocess”.
5.3. Install on your computer GIT client.
5.4. Open terminal, go to your plugin folder and initialize a git repo with the following command:
git init
5.5. Add all files to the local repo by executing
git add *
git commit -m “initial commit”
5.4. Push your source code to the repo in Bitbucket. On the overview page of your created repository in you will see instructions on how to put your source code into your repository. In my case instructions look like this
Step 1: Switch to your repository's directory
cd /path/to/your/repo
Step 2: Connect your existing repository to Bitbucket
git remote add origin
git push -u origin master
Follow the instructions, which you can see in the overview page of your bitbucket repository.
6. Create bitbucket pipeline.
6.1. Go to your repository in and choose Pipelines menu.
6.2. Create pipeline for Java language. bitbucket-pipelines.yml should look like this:

image: translucent/atlassian-plugin-sdk:latest
    - step:
        script: # Modify the commands below to build your repository.
          - atlas-mvn -X clean package sonar:sonar # -B batch mode makes Maven less verbose

You can read more about creating bitbucket pipeline here:
7. Upon new pushes to the repository the pipeline will build your module and create the build report in SonarCube.
You can see the build report here:

If you need the source code of the plugin you can get it here:

1 comment


Log in or Sign up to comment

very helpful what i was looking for is to give code coverage information in the bitbucket pull-request based on a report generated in bitbucket pipelines... same as you have build status

AUG Leaders

Atlassian Community Events