goanna

SCM Change Monitoring service and scripts


License
BSD-3-Clause
Install
pip install goanna

Documentation

Goanna : SCM Change Monitoring Server

Goanna aims to spare source repositories the overheads of frequent polling by CI setups such as Buildbot. It caches change information pushed to it by authorised repositories, and provides a simple web API for clients to polls for changes.

Redis is used as the storage backend. BottlePy is used to provide the web API.

Goanna is still under development and tested mainly using:

  • Python 2.6, Python 2.7
  • Buildbot 0.8.7

If you wish to try it out, do consider running the tests (see below) just to make sure it behaves in your setup.

TODOs:

  • Logging
  • Example VCS Commit hooks (CVS, SVN, Git, Mercurial)
  • Github-webhook compatible API, or better, submit a Github service hook
  • Housekeeping scripts (delete old commit data, etc)
  • Web APIs for reporting (latest revisions, storate stats, etc)

Requirements:

Additional requirements to run tests:

Running tests:

While we write most of the tests for Goanna using the standard unittest module, some tests required additional modules. For example, we use WebTest to support the testing of the WSGI-based web api and Trial to enable the testing of GoannaPoller.

To simplify test management and execution (and since we're already using it), we use Trial to launch tests:

trial goanna.tests

It is possible to get coverage results using trial --coverage however, the output can be a little unwieldy. To obtain sensible coverage results, we use coverage.py:

coverage run `which trial` goanna.tests  # run test while collecting coverage stats
coverage html  # generate HTML report (output in htmlcov directory)

Deploying the Web App:

For development and testing purposes, you can use examples/scripts/run_dev_web.py to launch a basic server.

For deployment, the app can be deployed just like any other Bottle app (see bottle docs for deployment).

To get an app instance, use:

from goanna.webapi import GoannaInABottle
application = GoannaInABottle("/path/to/goanna_web_config.py").get_app()

An example config file can be found in the examples/config directory of the source distribution. If a config file is not provided, the module will look for a config.py file in the current working directory failing which default settings will be applied.