Coding paradigm: line by line all my opinions are belong to me

Release announcement: jira-rest-cli-1.0 (jsr223 powered interactive jira scripting console)

Check it out

logo

jira-rest-cli is JIRA plugin which provides a possibility to use your favorite programming language to script and interact with JIRA server realtime. The plugin provide following working modes:

  • JIRA web-executor interface - allows to execute script input from Jira admin interface, no continuos working session support and no working context preservation between invocations.
  • JIRA web-cli interface - allows to create and manage working scripting sessions from Jira admin interface, connect to them and execute script code in the scripting session context - state is preserved between invocations.
  • The are sample console clients available (Ruby, Groovy) which works similar to interactive language shells (irb, groovysh).

At the moment following programming languages are supported:

  • JavaScript (Rhino) shipped with Oracle JDK - default
  • Groovy 1.7.9 - separate
  • JRuby 1.5.6 - separate.

Languages are implemented as standalone plug-able components, installed separately, except for Rhino available by default.

The target is to come as close to Firebug / IRB / Groovysh as possible :)

Screenshots

Web-executor mode (non-interactive)
Web-cli mode, session management
Web-cli mode, script execution (jRuby)
Remote console-cli mode, script execution (jRuby)


Project goal / scratch the itch
The problem I periodically get with the JIRA is the necessity of creating and configuring multiple different JIRA instance. In some cases this is pilot version, prototype extension or some stage/perf tests related configuration. Let’s say it as it is - it’s extremely difficult to setup thing in JIRA from scratch: projects, issue types, fields and all the schemas; there are just so mane of them out there.

So, I tried to automate certain things, at least at the local development environment. And I’ve found it extremely difficult to do so. So, I had this crazy idea - why couldn’t I have some kind of JIRA API Firebug? Some environment I could actually script my environmental changes, experiment with the stuff and optionally save/reuse scripts later on. And yes: it would be cool if I would be able to use familiar to me ruby and maybe try out some different languages.

Basically it’s the core idea behind my pet jira-rest-cli project.
Isn’t something already available out there?
Before doing something I did my homework and looked for other available options:

  • Python CLI for JIRA - basically cli interface to JIRA SOAP interface;
  • Jira Scripting Suite - provides a convenient way to put custom conditions, validators and post-functions into workflow in a form of Jython scripts..
  • Script Runner - provide ability to script (JSR-223 capable) workflow validators, conditions, etc..
What's wrong with? Actually - nothing. They are great pieces of software and they excellently do they should do - extend JIRA functionality and provide possibility to easily extend workflows (Jira Scripting Suite, Script Runner) w/o need to restart Jira server, or provide access to built-in remote access (Python CLI for JIRA).
The thing I've missed here - is to play with Jira API in the realtime, see what's inside of teddy bear looks like (latvian: kas lācītim vēderā) and the ability to use the same approach to automate certain operations.

How could I use it?
When working with it I have several use-cases in mind:</div><div>

  • Use it as console-tool to script and automate certain configuration changes (local development; staging etc development rollout)
  • Use it as a tool to play with JIRA system API at realtime (local development needs)
I would really appreciate if you will think out other use-cases and will report them back to me. So do it :)

How to start?

  1. git clone [email protected]:leonardinius/jira-rest-cli.gitcd jira-rest-cli/git submodule initcd jira-rest-cli-parent/atlas-mvn clean install
  2. To start play with the REST Cli - you need to install jira-rest-cli-runner plugin, which is a main entry point and Rhino language provider.
  3. If you want to try out JRuby or Groovy language support - then you should install jira-rest-cli-jruby or jira-rest-cli-groovy accordingly.

OR you could get all this artifacts here

NB: on my local dev environment I install all the plugins using atlas-cli since I launch JIRA using atlas-run / atlas-debug commands.

Ok, it’s useful. How could I help?

Cool. First of all you are in the right place with the right attitude :) The areas I’m struggling with on my personal Roadmap:

  • High priority: Documentation - both creating one and understanding what actually is missing. Even GitHub issues for this are welcome.
  • Medium priority: Upload plugin to Atlassian Plugin Exchange
  • Medium priority: Improving console-cli modes sample applications (JRuby, Groovy) - cleaning up, since I’m not expert in those languages; adding command line options.
  • Low priority: improving web-interface (more Ajax-like) etc…

PS: project is useful (at least for me) at the current stage and IMO documentation what is the only crucial piece missing.

Thin badge:


NB. If you've found typos or errors, please suggest a correction or edit on github.
comments powered by Disqus