You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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!