Hello,
I'm running a test environment and have a Jira container running in a VM using the dchevell/jira-core image. Using this tutorial: https://developer.atlassian.com/server/jira/platform/writing-jira-event-listeners-with-the-atlassian-event-library/ , I was able to create plugins. I'd like to add them to my container so they're installed when the container is spun up. How do I add custom events/plugins to the containerized version of Jira? I noticed there's a plugins file, but am not quite sure where to start.
Thank you! :)
Hi @Em
I am not sure you need to add them to your container unless you have your database and home directories in the container as well (likely not good practice).
I took the approach that my containers are as basic as they can be and are both stateless and location agnostic. The only things I add to the Docker images are the things it needs on the base OS as well as integrations with variables that I can provision at run-time.
Rather, your plugins, once installed in your running instance are in the plugins directory in JIRA_HOME and registered in the backing store database. As such, if your container, when it starts, points at the same JIRA_HOME and database, even if the plugin cache is blasted on startup, your plugins will load.
I have a couple of plugins that are company specific in my instance but they are not in my Docker images.
Let me know if you need further thoughts on that and we can talk about some of the things I did to containerize beyond the generic.
@Mike Rathwell Thank you so much for your help! I believe I see what you mean. Basically, if I install the plugin on a running instance, it's backed up in the database and can be reloaded when the container is spun up again. That sounds like what I need.
I am a bit confused on how to go about implementing this though. With the tutorial, I was given a Java project and created a class that was my plugin, ran atlas-run and there it was. I dug around the Jira Docker container and wasn't able to find a similar project structure (Java project with POM files, etc...). So, I figured I can make the plugin jar and add it similar to https://confluence.atlassian.com/display/JIRA040/Installing+and+Configuring+Plugins?_ga=2.128356684.199822407.1565027324-1991407200.1565027324 , but cannot find a /atlassian-jira/WEB-INF/lib/ either. How did you manage to add custom events to the Jira instance you're running?
Thank you so much again! I'm really new to all this and excited to learn more.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good morning @Em
If you have a jar file that dropped out of the dev environment, you should be able to just install it directly via the app manager... That'll put it where it's needed and get it started up when you drop it in (and then persist).
Events.... so far I've not descended to that madness... for me, there's enough going on in the environment triggered by so many things, I am loathe to add extra load to my system... Perhaps someone can chime in on this one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good morning @Mike Rathwell
Thank you again for your help! I see what you mean and will try that!
Yeah, it's been a bit harder to find information on custom event creation and management. Essentially, I'm trying to get an event triggered upon a status transition (eg. in-progress to done will trigger some process to occur). I was looking into custom generic events but so far no luck. I was also looking into webhooks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm... if that is what you are after, unless this is some super special action across the board in your environment, I've not yet come across a case where a post function couldn't make all manner of things happen.
If you want some asynchronous/global thingies, you might also look at Automation for Jira. That might get you where you need to be without resorting to code you have to maintain.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mike Rathwell Awesome, I'll take a look at Automation for Jira and post-functions! Thank you again :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.