How can I upgrade JIRA of Confluence plugins from the command line?

I want to automate the plugin upgrades on JIRA and Confluence so they will run at certain times and I am looking for a way to upgrade them from the command line.

Does anyone have an example? curl / wget / jira-python ?

Due to underlying bugs(like https://jira.atlassian.com/browse/JRA-37337) it seems that it became more and more important to perform upgrades when the instances are under very low load.

Also it seems that Atlassian introduces an option for updating *some* plugins automatically, but there is no option to tell JIRA which or when to perform these updates. I have at leas one outage due to such an update being happening at the "wrong" time.

4 answers

1 accepted

At this moment this is not possible but here are links to the feature requests. If you consider this important do not forget to add a vote to them and a comment explaining why these are important for you.

Bog, but I don't know what plugin to update. I wan to run a plugin update from cron, an update for existing plugins from the instance, clearly I don't know which one are installed or which ones do have updates. Does the SDK method provides a simple method that would allow this? As far as I know, this one was just for manually installing a plugin when you have the plugin code. I was looking for the Marketplace method.

FYI, I already have working code that can propaerly update Atlassian software from crontab, which works with multiple instances on the same machine, auto-detecting them, and also that supports EAP releases for instances that are used for testing.

Still now it doent handle plugin updates, which is a pitty.

No, the SDK method is primitive and assumes a jar and a pom minimum. You need to have that and know the plugin key to work with. Otherwise, I think you are into scripting retrival of the latest release url from marketplace or elsewhere and then scripting applying it to the upload add-on dialog.

Thanks Bob, sadly I do not consider the SDK api as something useful, as it would require a signifiant amount of effort to implement an upgrade mechanism for the plugins, which would have to replicate what JIRA or Confluence does on the server side. It seems that Atlassian has to provide an usable API that allows you to check for new versions and to perform the needed upgrades. I made two feature requests for these which linked from my answer. They both contain the reasoning behind the need for automating this (most important is Q&A and performing these on test instances, preventing "surprises" on production ones). Nobody can expect to be able to manually retest instances on each new product version.

Did you also handle the case when in the install fails and all the local changes because Atlassian still has not fixed their code yet?

I never use Atlassian installer as it is purely borken in too many cases. The upgrade uses only the tag.gz method, keeping your customizations and makes backups. I think that I am using it for more than 6 months by now and I have very few failures, and the failures were minor not requiring to restore back to old version. Example: I missed to add a file to the list of files to keep. Even so I am using it in the unattended mode only for test instances. For production I run it in dry mode and run it manually, when I am ready to react in case something goes wrong.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

377 views 20 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you