Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I have servers I delivery quickly, and I am looking to deliver apps/addons onto them

Kyle Manel December 9, 2019

I am curious if there is any way to download + install apps into Jira or Confluence in an entirely automated way, either via Linux Bash/CLI or APIs?

1 answer

1 vote
Deleted user December 10, 2019

Hi @Kyle Manel ,

 

You will be able to use our UPM Command Line Interface (CLI). The UPM CLI client is included with the Atlassian Command Line Interface (CLI) client distribution. It is not available separately. It is licensed software provided at no charge for license holders of any CLI product.

You will be able to use the action installApp to install the app to your JIRA instance. Please see the below example for reference. 


--action installApp --url "https://marketplace.atlassian.com/download/apps/697735/version/7301"

You will also be able to use the below action to get the latest compatible version

-a installApp --app <app_key>  
For example:  

--action installApp --app "org.swift.confluence.wiki"

And to install a particular version you can use the below action

-a installApp --app <app_key> --version <version> 
For example:

--action installApp --app "org.swift.confluence.wiki" --version "1.3.0"

Please see the page Examples for more actions and examples like addLicense,  removeLicense. Also see the page Reference which show different actions which you can perform. 

 

Also please see the page Getting Started with Configuration for Mac and Linux which shows the steps to install and use Atlassian Command Line Interface (CLI) client

 

Regards,

Vijay Ramamurthy

Kyle Manel December 10, 2019

Hello Vijay,

Thank-you very much for your information.  I apologize, I will have time to look into those links later, this might be what I am looking for, though when I mention interest in delivering them quickly, I want to specify that I envision explicitly CLI actions which can be used from a script file from the server shell.

Deleted user December 12, 2019

Hi @Kyle Manel , 

 

You can create a file like addon-install.sh as shown below on the server and then run the command to install the app. But note that you need to have the Jar file downloaded on the server from where you are executing the script.

 

#!/bin/bash
BASEURL=$1
USERID=$2
PASSWD=$3
PPATH=$4

url="http://${USERID}:${PASSWD}@${BASEURL}/rest/plugins/1.0/"
token=$(curl -sI "$url?os_authType=basic" | grep upm-token | cut -d: -f2- | tr -d '[[:space:]]')
curl -XPOST "$url?token=$token" -F plugin=@${PPATH}

 

Please see the below screenshot for reference.Screenshot 2019-12-12 at 5.05.06 PM.pngScreenshot 2019-12-12 at 5.04.43 PM.png

We have created the request in our support portal SUPPORT-3298. Please signup to our portal from this link and provide us the username so that we can provide you the required access for the request. 

 

Regards,

Vijay Ramamurthy

Kyle Manel December 18, 2019

I will be working to validate this tomorrow;
I am unclear on how I can procure a jar file for an addon which is not delivered through the Atlassian store; I could hypothetically procure the jar file from an already installed server, then use it via this installation on another, but that seems like a lot of unnecessary leg work, and would not provide a convenient automation for a new server;
My ideal objective here is to completely automate the installation of a new server, and procure all of the addons it necessitates with no human interaction, though this will help regardless, and I do want to thank-you for it.

Kyle Manel January 2, 2020

Are you aware of APIs for Atlassian's servers which allow to download the jar files?

Michael Kuhl {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2020

Hi Kyle - You can try using the Atlassian Marketplace API to fetch the latest version ID of an app then build the download URL with that based on the version download format:

https://marketplace.atlassian.com/download/apps/10886/version/9100

where 10886 is the app ID and 9100 is the version ID. 

Suggest an answer

Log in or Sign up to answer