Isolated test runner with Docker
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
docs
lib/cide
man
script
spec
.dockerignore
.editorconfig
.gitignore
.nojekyll
.rspec
.rubocop.yml
.travis.yml
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE.md
README.md
Rakefile
cide.gemspec
cide.yml
index.html

README.md

cide - Isolated build tool and test runner with Docker

cide is a command-line tool that builds packages and runs tests in an isolated (docker) environment. It solves a problem where Jenkins workers need all the project's dependencies (possibly conflicting) to be installed on the boxes. With cide each run gets its own set of temporary docker containers which are scratched at the end. Incidentally it is also possible to run the same cide command on the developer machine and get the same build environment as on the CI. This makes configuration iterations much shorter and allows to converge on a working configuration faster.

Usage

Go to the target project's root and run cide init to populate a default cide.yml. This file contains all the instruction to build your project with cide.

Once the file is configured run cide to execute the build. All the output will appear in the console.

Example

cide.yml

---
from: "ruby:2.1"
as_root:
- apt-get update -qy && apt-get install -qy libxml2-dev
before:
  add:
  - Gemfile
  - Gemfile.lock
  run: bundle install --jobs=3 --retry=3 --deployment
run: bundle exec rspec

See the cide.yml man page for the full documentation.

Features

  • straighforward to use, just run cide inside of your project
  • works on OSX with boot2docker
  • integrates easily with jenkins or other CI systems
  • can use linked containers for backend dependencies like MySQL or redis
  • artefact export

Missing features

  • Linked container readiness detection. Some containers take a while to boot up. Currently the script/ci must implement some sort of detection loop.
  • Language detection: default settings per language (see Travis-CI). The current format might be a bit daunting for non-experts.
  • Build matrix: run variations of the tests, for example with different versions of ruby to make sure all are supported (useful for libraries).
  • Support for local docker machine

PR welcome !

Installation

The current dependencies are ruby 2.0+ and docker 1.5.0+

On OSX, boot2docker is automatically used if installed.

Quick OSX docker install:

brew install boot2docker
boot2docker init
boot2docker up

Then install the cide ruby gem:

gem install cide

Similar projects

TODO

  • Explain how to use cide with Jenkins
  • Explain Travis CI vs cide + Jenkins