Installation
Installing Sismo is as easy as downloading the sismo.php
file and put it somewhere under your web root
directory. That's it, the CLI tool and the web
interface is packed into a single PHP file.
Note that Sismo needs at least PHP 5.3.3 to run.
Configuration
By default, Sismo reads its configuration from ~/.sismo/config.php:
<?php
$projects = array();
// create a Growl notifier (for MacOS X)
$notifier = new Sismo\GrowlNotifier('pa$$word');
// create a DBus notifier (for Linux)
//$notifier = new Sismo\DBusNotifier();
// add a local repository hosted on Github
$projects[] = new Sismo\GithubProject('Twig (Local)', '/Users/fabien/Twig', $notifier);
// add a remote Github repository
$projects[] = new Sismo\GithubProject('Twig', 'fabpot/Twig', $notifier);
// add a project with custom settings
$sf2 = new Sismo\Project('Symfony');
$sf2->setRepository('https://github.com/symfony/symfony.git');
$sf2->setBranch('master');
$sf2->setCommand('./vendors.sh; phpunit');
$sf2->setSlug('symfony-local');
$sf2->setUrlPattern('https://github.com/symfony/symfony/commit/%commit%');
$sf2->addNotifier($notifier);
$projects[] = $sf2;
return $projects;
For notifications, you can also use any Cruise Control "tray" software as
Sismo also exposes an XML file in the Cruise Control format:
http://path/to/sismo.php/dashboard/cctray.xml
Use CCMenu on Mac, CCTray on Windows, JCCTray on Windows or Linux, or
CCMonitor for Firefox.
Using Sismo
Build all configured projects by running the build command:
$ php sismo.php build --verbose
If a build fails, Sismo will send notifications. Use the output command
to see the latest build output of a project:
$ php sismo.php output twig
If you have configured Sismo to be accessible from the web interface, you can
also check the build outputs there:

If your web server runs under a different user than the one you use on the
CLI, you will need to set some environment variables in your virtual host
configuration:
SetEnv SISMO_DATA_PATH "/path/to/sismo/data"
SetEnv SISMO_CONFIG_PATH "/path/to/sismo/config"
The
build command is quite powerful and has many options. Learn more by
appending
--help:
$ php sismo.php build --help
To make Sismo run whenever you commit some changes, use this post-commit
script:
#!/bin/sh
php /path/to/sismo.php --quiet build symfony-local `git log -1 HEAD --pretty="%H"` &
symfony-local is the slug of the project. You can also create a
post-merge script if you want to run Sismo when you merge branches.
Tips and Recipes
Change the default Location
Set the following environment variables to customize the default locations use
by Sismo:
# in a .htaccess or httpd.conf Apache configuration file
SetEnv SISMO_DATA_PATH "/path/to/sismo/data"
SetEnv SISMO_CONFIG_PATH "/path/to/sismo/config"
# for the CLI tool
export SISMO_DATA_PATH=/path/to/sismo/data/
export SISMO_CONFIG_PATH=/path/to/sismo/config/
Tracking multiple Branches
To track multiple branches of a project, just make their names unique and set
the branch name:
$projects[] = new Sismo\GithubProject('Twig (master branch)', '/Users/fabien/Twig');
$projects[] = new Sismo\GithubProject('Twig (feat-awesome branch)', '/Users/fabien/Twig@feat-awesome');
Note that Sismo uses the same clone for projects sharing the same repositories
URL.
Running Sismo for Remote Repositories
Using Sismo for remote repositories is as simple as adding the Sismo building
tool in a crontab entry:
0 12 * * * php /path/to/sismo.php --quiet
History in the Web Interface
The build history for a project in the web interface is different from the
project history. It is sorted in the order of the builds so that the latest
build output is always at your fingertips.
Limitations
Sismo is small and simple and it will stay that way. Sismo will never have the
following:
- a queue (if a project is already being built, newer commits are ignored);
- a web interface for configuration;
- metrics support;
- plugin support;
- other SCM support;
- slaves support;
- built-in authentication.
... and probably the feature you have in mind right now and all the ones you
will think of later on ;)
Adding a Notifier
Sismo comes with the most common notifiers but you can create new ones very
easily: extend the Sismo\Notifier abstract class and implement the
notify() method:
public function notify(Commit $commit)
{
// do something with the commit
}
The Commit object has many methods that gives you a lot of information
about the commit and its build. You can also get general information about the
project by calling getProject().
Who is behind Sismo?
Sismo is brought to you by Fabien
Potencier, the creator of the Symfony framework.
Sismo is released under the MIT license and the
code is available on Github.