CakePHP Continuous Integration and Deployment App
PHP JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
controllers
locale/eng/LC_MESSAGES
models
plugins
tests
tmp
vendors/shells
views
webroot
.htaccess
README
app_controller.php
app_model.php
index.php

README

/*
 * CakePHP Continuous Integration and Deployment App 
 * Copyright (c) 2009 Matt Curry
 * www.PseudoCoder.com
 * http://github.com/mcurry/builder
 *
 * @author      Matt Curry <matt@pseudocoder.com>
 * @license     MIT
 *
 */
 
/* About */
  This is app is about as rough as you can get.  It's like 100 steps away from even being alpha.  Consider yourself warned.  Plus, I coded it to fit my specific needs, so you'll probably need to make some changes (and give back?) to make it fit your deployments.  PHP5 only.  I doubt it works on Windows.  Will probably work on OS X, but I haven't checked.  Works on Linux.
  
/* Why Bother Then? */
  1. I spent some time researching some of the better know CI apps.  They all seemed to bloat-y and java-y for my tastes.  I wanted something simpler and awesomer.
  2. I was ridiculously jealous of testswarms (http://testswarm.com) ability to run it's unit tests for every commit.  I wanted that.
  3. Other benefits: clears caches, forces debug to 0...
 
/* What's Missing */
  1. No email notifications
  2. No remote sync
  3. My git-fu isn't so great.  The git implemention could probably use some love from someone with more experience with git.
  4. The SVN part uses export instead of switch, which makes it slower then it needs to be.  I've had issues with switch in the past, which is why I avoided it.  That was probably a bad decision.
  5. Doesn't handle DB updates (and should probably have an option to make a backup before build).  I intend to implement Cake's migrations.  
  6. No integration with build systems such as ant, phing or capistrano.
  7. Single user.
  8. Lots more...that's just what I could think of off the top of my head.

/* Install Instructions */
  1. Get the latest version of CakePHP 1.2 (http://cakephp.org)
	2. Get your Cake install up and running.
	3. Download the repo and replace the app dir.
	4. Create a database and run app/config/sql/builder.sql to create the tables.
	5. Copy app/config/database.php.default to database.php and update it with your DB settings.
	
/* Setup Instructions */
	1. Visit http://<your_app>/users/install to create a user.
	2. Click "add site" in upper right and create a site.
	3. Click "add instance" to create an instance of the site (test, qa, stage, beta, production...)
	  - Enabled and name are pretty clear
	  - Path is the full path on the file system where you want the install to go.
	  - App and Cake Path are the full paths to the app and cake folders after the install.  I did this because sometimes these folders aren't in the root of the install path.  These are only needed if you are going to be running unit tests.
	  - Skip Sync: any files and directories you don't want deleted or sync'd as part of the build.  I usually have database.php in here.
	  - Continous: will do a build anytime there is a new commit.  If you don't select this you will manually kick off builds.
	  - Version Control: Right now SVN and git are supported.
	  - Source is the path in your version control to the app.  Branch is what branch/tag you want to build.  
	  - Source username and password can be left blank if you some other form of auth setup.  Or this can be set in the datasource in database.php
	  - Test is if you want to run the unit tests.
	  - Test Each is if you want to do a build and run the tests for every commit.
	  - Force Debug Off: will make sure that debug is set to 0.
	  - Version Txt: will write a version.txt in your webroot dir that will info about the current build.
	
/* Running The Build */
  1. The builder shell can be added to cron to check if new builds are needed.  I run it every minute, since only one instance will run at a time if it's already going the second one will just die.
  2. I would suggest running the build manually until all the kinks are worked out.  From /app ../cake/console/cake builder.
  3. If something goes horribly wrong and the shell dies it will leave behind a file in /tmp/cache that needs to be deleted before it can run again.