Join thousands of Atlassian users for an unforgettable week of knowledge sharing, product training, networking, and fun. Atlassian Summit is Oct 10 - 13 in San Jose, CA – Register soon before tickets sell out.
I want to run some code before upgrade. Is there a way to intercept plugin upgrade, run custom code and then resume upgrade.
JIRA converts components into spring beans internally.
Create a Component Plugin module that implements InitializingBean and DisposableBean. When the plugin will be installed/enabled/upgraded then afterPropertiesSet method will be invoked and when plugin will be disabled/uninstalled then the destroy method will be invoked.
So, If you are upgrading a new plugin then afterPropertiesSet method will be invoked on new plugin and destroy will be invoked on old plugin.