CI tools

Ultimate goal of Continuous Integration tools is to provide “integration button”, magic key hit that will do everything needed for product to build & deploy. While there are some tools available, none of those fullfills our real-world needs.

Basic idea is simple: use in similar fashion as Makefiles or ant, but take advantage of setuptools plugin system to provide globally available commands, easily configurable for every project.

We are making some assumptions about project structure and needs. If you need to configure something more, let us know, or just fork us at github and send us Your pull request.

Licensed under BSD, this library is maintained by Ella team from Centrum Holdings. For feedback, ideas, bug reports and friends, let us know in mailing list.

On (continuous) versioning

Idea is simple: if you should be able to deploy software any time, every revision must have a release number. Thus, we have a “stable” version prefix, which we assume to be set by tag. Last digit in version is build number, thus number of commits since last tag [1]. Number of digits in your version is arbitrary, but must be at least three (two for version prefix, like projectname-1, and one for build number).

Then, version must be replaced in all files needed. We’re now rewriting in following form in following places:

  1. VERSION in $project/ is set to version tuple (not string). We’re assuming layout as in our django-base-library (which is actually not much about Django).
  2. __versionstr__ (if found) in is replaced to string (not tuple). This is for libraries that must not import library itself and set version to $library.__versionstr__ dynamically
  3. TODO: debian ,)

“Meta” packages

There may be need for creating “meta” packages, that do not contain any code, but just specifies which packages should be bundled together (and in which version). Citools supports this behaviour by automatic computation of metapackage version and specifying exact version (especially for debian).

You must only specify repositories You depend upon in arguments for setuptools.setup (only git supported for now)::
dependency_repositories = [
ssh://server/my/library1”, “”,


By running compute_meta_version_git, library version will be computed as it’s own version + sum of all versions of all child libraries.

Specification via argument will be deprecated, you should use command line arguments instead.

(Django) web environment

Build process


Working with databases

Downloading and restoring backup:



citools -c /etc/$project/citools.ini db_restore

Supported backup formats are .tar.gz|bz2, .sql.gz|bz2 and plain .sql. When you use tar archive with more databases, you can restore more databases at once, if you define more sections with prefix database in your ini config file:




when run as db_restore, /etc/$project/citools.ini is the default

Distribution and Deployment


[1](TODO: Following is actually not yet supported; we’re now assuming only version setting tags) “Last tag” means “last tag that is setting project version”. We support other tags, so either you must use $projectname-$version tags, or pass version_regexp argument to setuptools.setup in, which must be in form TODO