Atlassian Plugins – Common SDK Commands

Now that the Atlassian SDK is installed, we’ll familiarize ourselves with some of the things it can do.

There is a full command reference available, so i will not by any means cover them all. What I mean to accomplish is to provide an overview of some important ones, and provide some use cases.

Note on HTTPS


As a general note, if you happen to be using a computer managed by a business, it is likely that you may have some root CA that intercepts your HTTPS traffic. Because Java is dumb, you will need to make sure your root CA is in the Java certificate store.

If you’re running in mac under these circumstances, then you’ll probably just need to tack

onto the end of most of the atlas- commands that you run. If you see any SSL failures, it likely means you forgot.

The command indicates to java that it should use the mac os keychain for SSL verification. There has to be some way to make that happen by default, but I have yet to Google it. Something about finding a solution that works good enough for now.

Creating Plugins


The Atlassian SDK is your one stop shop for plugins for Atlassian products. Whether you’re looking into Bitbucket Server like me, Jira, Confluence, or their other products, this SDK does it all.

All of their commands to create plugins with atlas-create- for example

When you run one of these commands, it will ask you a series of questions that it uses to create the project from a template.

It will create a folder for the project, it will make a README, and a Maven pom.xml file

A lot of what it creates is not going to be needed by everyone, so I recommend taking a look through what you get.

Build and Run


The run, debug, and compile commands are great for just that.

When you run or debug, it will even spin up a locally running server with your plugin installed.

If you already have the server running and want to make a code change, you can run

This has the benefit of not having to restart the locally running server for a minor code change.

 

As a note, I have had caching issues, so whenever you make a UI change, you should clear your browser cache, and refresh the page.

Package


When it comes to creating a package to distribute, the package and release commands should get you what you need.

I haven’t used release because I don’t release to the Atlassian Marketplace, I just made a package and sent it off to our local administrators for them to install it.

 


There are a ton more commands to run. I really recommend taking a quick look through either the tab completion when you type in atlas- in terminal, or the documentation to get an idea of the different commands available to you.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *