ianwhite / garlic
- Source
- Commits
- Network (2)
- Issues (0)
- Downloads (10)
- Wiki (1)
- Graphs
-
Tree:
a76d7c4
garlic: lightweight continuous integration for rails using git
This is not a CI server, use cruisecontrol.rb for that. This is a simple set
of rake tasks that let you specify a bunch of rails builds to run against, and
dependencies to install.
This is aimed at testing plugins (or apps) against multiple versions of rails,
and allows specifying other plugin dependencies (and their versions and any
setup requried).
If you want to run your specs (or whatever) against different versions of gems
that you have installed, then check out ginger by Pat Allen
Garlic works by cloning git repos for all your dependencies (so they all must be
git repos), and then using git to checkout various tags and branches to build
your app against.
It’s still new, and not shiny yet
Please feel free to make it shinier. I’m successfully using it on most of my plugins, and I test
with garlic and cucumber.
Get up and running quickly
You have a plugin and you want it tested against different versions of rails?
- install garlic as a gem (see below)
- cd into your (say, rspec tested) plugin directory
garlic generate rspec > garlic.rb garlic install_repos garlic
- See what happens, edit garlic.rb to change rails versions and other stuff.
garlic --help # will probably help
Installing
Install the garlic gem
sudo gem install ianwhite-garlic —source=http://gems.github.com(if it’s not installing as a gem from github)
git clone git://github.com/ianwhite/garlic cd garlic rake package sudo gem install pkg/*.gemExample
To see garlic in action, download response_for, a rails plugin that uses
garlic for CI.
run garlic
garlic allThis will clone all the required git repos (done only once), set up the target
railses (done once), then run the targets.
Once you’ve made some changes
You can prepare and run all the targets again (without fetching remote repos) by doing
garlicThis will prepare all the targets, using the current HEAD of the repos, and run the
CI task again.
Specifying particular targets
If you just want to run against a particular target or targets, you can use the TARGET or TARGETS
env var.
Running Shell commands across multiple targets
Check dis out
garlic shell # Example outputYou can pipe any thing into garlic shell and it will execute across all of your garlic targets
Lend a hand
This is an early release, so there is plenty of scope for changes and improvement
If you want to lend a hand, get in touch.
© Ian White 2008 – ian.w.white@gmail.com
MIT Licence
Lent a hand
Thanks very much to:
- Pat Allan
- Dr Nic Williams
