GithubHelp home page GithubHelp logo

pborreli / sismo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from friendsofphp/sismo

1.0 1.0 0.0 1.13 MB

Your Continuous Testing Server

Home Page: sismo-project.org

License: MIT License

PHP 100.00%

sismo's Introduction

Sismo: Your Continuous Testing Server

Sismo is a Continuous Testing Server written in PHP.

Unlike more "advanced" Continuous Integration Servers (like Jenkins), Sismo does not try to do more than getting your code, running your tests, and send you notifications.

What makes Sismo special?

Sismo has been optimized to run locally on your computer for your Git projects. Even if it can test remote repositories, Sismo is better used as a local post-commit hook. Whenever you commit changes locally, Sismo runs the tests and give you immediate feedback before you actually push your modifications to the remote repository. So, Sismo is a nice complement to your Continuous Integration Server.

Sismo is language and tool agnostic. Just give it a command that knows how to run your tests and returns a non-zero exit code when tests do not pass.

Sounds good? There is more. Sismo is insanely easy to install (there is only one PHP file to download), easy to configure, and it comes with a gorgeous web interface.

http://sismo-project.org/images/sismo-home.png

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.2 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:

http://sismo-project.org/images/sismo-project.png

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.

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 ;)

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.

sismo's People

Contributors

ajessu avatar dator avatar fabpot avatar halk avatar kwiskia avatar pborreli avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.