Pronounced "JIRA A.P.Py" - A python-based WebApp to interact with JIRA's API. Leverages CherryStrap framework.
This program is intended to be used by a single JIRA Administrator with administrator-level global permissions in JIRA. When logging in via OAuth, token/secret credentials are stored for the user currently logged into JIRA in the same desktop environment. For that reason, a username/password combination is recommended for access to this WebApp.
JIRA has a fairly comprehensive API that can perform a great many functions. Instead of installing dozens(!) of small add-ons that perform very specific functions or writing your own add-ons, it often makes sense to make use of the API instead. It keeps your JIRA install clean, and the API can be utilized 1:1 for OnDemand or Server instances. For example...
- You want to click a single button to generate multiple issues according to a template you define
- You want to bulk-process issues according to your own algorithms. Blue Sky.
- You want to automate API tasks on a schedule. Cron +.
- You want an action in JIRA to fire another action that you can custom define (Webhooks / Listeners)
Many of these features don't yet exist, but with a proper framework in place - further development should be fairly straightforward.
- WebApp framework in place (CherryPy + Mako Templates + Bootstrap = CherryStrap)
- Python packages / libraries included so user-installed dependencies are few
- Restart/Shutdown the WebApp from UI
- https:// (SSL) option
- Configuration form for JIRA integration complete (no hardcode)
This software is in very early stages of development, so the feature list is fairly short for now.
- Easy OAuth login/logout with JIRA when integration successfully configured
- Reindex (currently errors in Status Code 415 - see the Issues list)
- Bulk Delete Worklogs
If you're a WebApp developer familiar with Python, we would love for you to contribute! The framework and handshaking are already in place, so it's really just a matter of seeing how existing functions are implemented and writing your own.
If you simply want to add Frontend Features, the easiest way to do so is in the following two files:
- /cherrystrap/WebServe.py => python algorithms to process API calls/returns
- /data/interfaces/default/*.html => HTML to display I/O for algorithms
- Python 2.7
- OpenSSL to generate RSA private and public keys
- pyOpenSSL required if you would like JIRA-APPy to auto-generate a self-signed certificate
- Alternatively, you may choose to install your own self-signed SSL certificate. This guide should set you on the right path.
git clone https://github.com/theguardian/JIRA-APPy
cd JIRA-APPy
- Generate RSA private and public keys on the server where JIRA-APPy is located
mkdir keys
cd keys
openssl genrsa -out RSA.pem 1024
openssl rsa -in RSA.pem -pubout -out RSA.pub
python JIRA-APPy.py
(usesudo
if running on Port 80 or 443)- Runs in foreground. To run as daemon, append flag
--daemon
- Runs in foreground. To run as daemon, append flag
- Visit http://YOUR.SERVER.IP.ADDRESS:7889 though any browser
- Click 'Config -> Configuration'
- Give your instance a name
- Set an absolute path for the log file if you wish
- Change the port number if you wish
- If https:// is enabled, change to Port 443
- If you generated your own SSL certificate, point the HTTPS Key and HTTPS Cert fields towards the relative path where these files are located, or move the keys to JIRA-APPy/keys
- Give your site a username and password
- Populate
Consumer Key
with text (this is your unique identifier to handshake with JIRA later) - Populate
Consumer Secret
with text (the contents don't matter) - Populate
JIRA Base URL
with the URL to your JIRA instance (don't forget http:// or https://!)
- Click 'Config -> Restart' to load changes
- If you changed the port number, remember to visit the new URL
- If you changed to port 80 or 443, restart will fail (see Step #4)
- In JIRA's navbar, click the cog wheel and choose
Add-Ons
. ClickApplication Links
- In the
Application
field, enter the base URL for JIRA-APPy and clickCreate New Link
- A
Link Applications
modal will pop up- Give your Application a name, and declare it a 'Generic Application'
- Leave everything else blank and click
Continue
(Communication is currently one-way only)
- Your Application Link should now be listed. Click
Edit
. ClickIncoming Authentication
in the modal- Enter the
Consumer Key
from Step #6 of Initial Setup - Enter some text in
Consumer Name
(the contents don't particularly matter - call it JIRA-APPy) - Copy the contents of RSA.pub that was generated in Step #3 of Initial Setup and paste it in
Public Key
- Enter the base URL for JIRA-APPy in the
Consumer Callback URL
field
- Enter the
- Go back to JIRA-APPpy and click
Login with JIRA
. Allow the link on the redirect page. You should receive confirmation that handshake was a success! - If you receive any errors, check the JIRA-APPy log file
GNU General Public License, v2. Free to use, distribute and modify for all purposes. See LICENSE file for more information.