Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

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