gitce - git continuous execution ============================================================================= A simple shell-based continuous integration tool. https://www.new-thoughts.org/gitce/ -- Content * Basic Usage * Trigger * Plugins * Web Interface * Monitor * License Basic Usage ============================================================================= The core pattern this tool follows forces the codebase to have a single executable which can decide if the current state of the code is ok or not. This pattern is great for having a clean infrastructure and to use it with "git bisect run" to find regressions fastly. The default executable gitce searches is "test.sh". The return code decides if the test was successful or not. 0 (zero) means success, everything else failure. To use the gitce commands, you need to provide a configuration file with at least the "REPOSITORY" entry which points to the source repository to check. Example: REPOSITORY=https://github.com/sarnowski/gitce The tools will look at the following locations for the configuration file: As root: /etc/gitce/<CONFIGFILE> As user: $HOME/.gitce/<CONFIGFILE> or you can specify the file directly. You can find an example configuration with further explanation in the "examples" folder: share/examples/example-project Trigger ============================================================================= gitce supports three kinds of triggers. The default and most prominent trigger is the "source changed" trigger. Using the gitce watcher will trigger a build upon every code change. It will poll the git repository for changes. If you need a cron based trigger or only a manual trigger, you should disable the automatic watching of the configuration by setting the configuration parameter "AUTO_RUN" to "no". To manually trigger a configuration, run "gitce run-newest example-config" on your shell. Using the same command you can configure a cronly trigger: 0 */2 * * * /usr/local/bin/gitce run-newest example-config Plugins ============================================================================= To support build server specific environments it is possible to define hooks which can setup and teardown the build environment or send notifications. For more informations look at share/examples/hooks/README. There are some prebuild hooks containing features like * Mail notifications * VNC server management Web Interface ============================================================================= gitce provides a simple web interface to track the current state of the build server. To use it, you need a CGI capable web server. The following Apache2 configuration gives an example of how to configure your server (works with default Debian "squeeze" Apache2 package). <VirtualHost *:80> ServerName gitce.example.com DocumentRoot /usr/local/share/gitce ScriptAlias /cgi-bin/ /usr/local/share/gitce/cgi-bin/ # Enable to allow unified dashboard usage. Be aware of # security implications! #Header add Access-Control-Allow-Origin "*" </VirtualHost> Access it with your HTML5 capable browser: http://gitce.example.com/ WARNING: The web interface is highly exploitable and is not secure in any way at the moment. The web interface will not provide any user management by itself. Be sure to block any malicous sources. Only run it in your trusted internal network or secure it by granting only access to trusted users. HINT: Use your e-mail addresses as htpasswd users. The web interface will compare htpasswd users with the git authors e-mails and can give a personalized view. Monitor ============================================================================= To have a nice monitor setup in your room, have a look at the "monitor" directory in the "examples" directory. Basically, you can access a monitor-optimized page for a configuration via web browser. A HTML5 capable browser is required (used with Google Chrome). http://gitce.example.com/monitor.html?example-configuration License ============================================================================= See the LICENSE file.