Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What is the best way to store data when developing bamboo plugin

sta-szek May 14, 2018

Hi

I'm developing bamboo plugin and I need to store data, specific for each build.

So if I have: project=A plan=B buildNumber=1, I want to store data under some key or table like A-B-1. This will be build specific data, not plugin.

I was reading docs, and the only thing I found is BandanaManager and some AO objects? However I couldn't find any comprehensive documentation with working use cases.

 

Using BandanaManager I have some issues:

* Sometimes after atlas-mvn package (reload plugin) it cannot read data that was created before. It throws ClassCastException telling that class com.example.A cannot be cast to com.example.A. I dig into google and found out that might be class loader problem?

* Sometimes (and recently always) after atlas-mvn package (reload plugin) it loses all data that was persisted before. Is that feature or bug or development mode side effect? I want to keep that data in bamboo as long as possible (as long as the build can be shown in history) and not lose it every bamboo restart or new plugin version.

 

So my questions are:

* Where can I find comprehensive documentation about data storing (in bamboo)?

* What is the best way to store data in my case? (BandanaManager, AO, other?)

* Is there any way to store data in db and use e.g. liquibase or any other kind of migration?

 

What I can optionally do to get rid of db migrations is to use Gson or ObjectMapper (BTW which is proper one one developing bamboo plugin?) and write objects as JSON - even better for me.

 

I would appreciate some (working) code snippets!

Thanks

1 answer

1 vote
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2018

Hi Piotr,

I wanted to let you know about another resource that may be more helpful for developing a plugin: Atlassian Developer Community

Best wishes for the weekend,

Ann

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events