So i had a crazy idea and I was wondering if anyone out there has tried this before I spend more time researching this.
Working with multiple JIRA instances, and they all tend to have some variations of similar scripts, in normal files and in added built-in scripts. Each JIRA instance is housed on its own VM.
My end goal is to sort of merge all of the common scripts, create more standardized built-ins with a broader range of parameters, indead of having all of these different ''almost the same'' scripts here and there that just get too confusing to know exactly which does which.
One thing I was wondering is if it would be possible to have an actual core folder hosted somewhere with some base classes or even just plain scripts, and be able to just refer to that path on the JIRA instances, so that once a change is done in one it will be changed on all JIRA instances. I experimented a bit with the GSE http://groovy.codehaus.org/api/groovy/util/GroovyScriptEngine.html class with no success, Not sure if this is even possible? Jamie's mentioned a few times that the script needs to be located within the JIRA installation, can I just put a script there that parses the contents of a remote file and runs the script contained there locally?
If there's another way to achieve the same kind of result out there i'm also all ears. Or course it might just be possible to set up replication for core scripts from a central location, but that's really not that practical for testing/debugging.
Not sure from your description, whether you mean you network location. I would suggest to:
Anyway, there is a problem with inline scripts - they don't have access to classes in script roots, as they are not executed within GSE, but GroovyShell.
Just to add to Jozef's answer. You can put them anywhere that is accessible by all your hosts, eg NFS mount. Either sym link that to the home/scripts dir, or set a new script path in system property.
Or, morally the same, have all your scripts in VCS and something that checks them out on all the instances.
Script roots explains how to set the roots in a system property.
I agree with your motivation though, you should consolidate as much as possible. And for bonus points, test.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG