For my day job I've been monitoring a jenkins instance (specifically, the public Ubuntu QA jenkins instance) using my web browser. This is obviously suboptimal - I'd like to be able to see the state of the jenkins jobs I'm interested at a glance, without having to open my web browser.
I couldn't find a solution to my problem, so I created one: indicator-jenkins is a panel indicator for your desktop manager of choice. It allows you to select one or more jobs from a jenkins server, and follow the job state without having to open your browser.
The project is hosted on launchpad, and is built daily into my PPA. To install it (I'm assuming you're running Ubuntu):
Once it's installed you can launch it in a couple of different ways:
- From a terminal - jut run indicator-jenkins. If you run it on the terminal you'll get a lot of debugging output (useful if you want to submit a patch, or figure out why it's not working).
- From the unity dash - open the dash, and search for 'jenkins' - it's probably going to be the first link.
Once it's running you should see the jenkins icon in your panel. To set it up, click the icon to open the settings dialog, enter the URL of the jenkins instance you want to look at, hit the refresh button, and pick the job(s) you want to monitor. Click OK and you're done! It's simpler than it sounds - see for yourself:
Right now it's pretty rough-and-ready - there are many features I'd like to add:
- Integrate desktop notifications, so you can be alerted when a job state changes.
- Customise panel icon based on job state (i.e.- show a red icon if any of the monitored jobs are failing).
- Allow user to customise refresh period.
- Allow user to monitor jobs from more than one jenkins server.
- Show more information about a jenkins job. For a start, show stability as well as current status, and maybe in the future show unity test pass/failure rates for projects that have that information.
The entire application is written in python. We make use of several python modules:
- The python-appindicator package gives us the ability to create an icon on the menu, and the python gtk2 bindings are used to create the menu and settings dialog.
- The python 'multiprocessing' module is used to spin up worker processes to fetch the data from jenkins. Initially the application used threads for this, but python's threading support isn't great, and it was taking too long.
- The python 'json' module is used to save and load settings.
- The python-jenkins package is used to communicate with the jenkins server.