Get versions of installed apps and compare it with marketplace

Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2021

Hi

 

I want to create a script that wil be get versions of every installed apps in my JIRA. Next I want compare apps installed version with marketplace and if app can be updated - create issue in JIRA.

Basicly I want to use UPM functionality to get apps that can be updated.

 

Do you know if it is possible?

 

Regards,

Seba

1 answer

1 accepted

0 votes
Answer accepted
Radek Dostál
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 8, 2021

Why not do this through UPM in the first place, is it because the instance is behind firewall and can't access the marketplace?

Radek Dostál
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 8, 2021

I'm asking because if Jira cannot connect to the marketplace, then the installation process is to either shutdown Jira, upload the .jar files manually, and start Jira back up, or you would need to "hack" the manage apps page to upload your .jar files, with no guarantee that they will be installed correctly (there is no public API to upload .jar files to upgrade plugins).

 

Edit: although this page seems interesting https://ecosystem.atlassian.net/wiki/spaces/UPM/pages/6094960/UPM+REST+API

 

 

Like Sebastian Krzewiński likes this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2021

Actually, it's not that hard to install apps on a non-internet-connected Jira.

Assuming you are on a client machine that can see the Jira and the internet (your desktop or laptop for example), then you download the jar or obr file to that, then log into Jira, go to manage apps and click "upload", feeding it the file you downloaded.

This works for upgrades as well as new installs - apps have an internally unique name, and uploading a new version of something with the same name disables the old, effectively replacing it.

Like Sebastian Krzewiński likes this
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2021

@Radek DostálI don't want to install/update jars from marketplace. Before plugin update I need to have ticket for that. I'm lazy admin and I don't want to check every day what add on is ready to update. I want to create a script which will be check what apps are ready to update and create issue for this.

 

Regards,

Seba

Daniel Ebers
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 9, 2021

While I cannot provide any ready solution at least I'd want to confirm the link Radek already mentioned for UPM is worth having a look, and well, for Marketplace there is the following API: https://developer.atlassian.com/platform/marketplace/rest/intro/

A personal contribution: we had some years back then the same idea but dropped it at the end, the Apps to be updated are put into a change ticket (change record) and that's it.
Reason: considerations showed working out a concept, documenting it and maintaining the logic including code would be greater than a manual approach (the solution would cover 10 Jira instances back then, in case you have a greater amount the calculation on effort might differ).

Like # people like this
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2021

Hi @Daniel Ebers thanks for cons of my idea. I started thinking about it more and I agree with you :) thanks again!

Suggest an answer

Log in or Sign up to answer