Skip to content

blazingly fast continuous integration and delivery using docker

License

Notifications You must be signed in to change notification settings

factisresearch/Frozone

Repository files navigation

Build Status

Frozone

We're building Frozone to replace our Jenkins Continuous Integration system. Frozone will enable a team of developers to check source code changes by compiling the project and running the unit tests before the changes get commited to a collaboration repository. Frozone will be enable to automatically deploy and run those changes for review by other developers and the QA team. The reviewers will be able to review the changes and accept or reject them.

Using docker the developers can fully describe the system needed to run a program including the distribution (Ubuntu 14.04), packages that need to be installed (apt-get install nodejs), the libraries that are required (npm install bloomfilter) and all needed configuration. Even though a clean build of the complete system might take an hour Frozone will be able to give feedback about your changes much faster by using an intelligent cache that depends on the build description. For our project we're aiming to get feedback for most cases in less than 2 minutes.

Frozone is far from alpha quality and heavily under development. This is a description of what it will look like when we reach alpha quality. We're fast coders so stay tuned!

Install

  • From Source: Check the Dockerfile located at ./docker/Dockerfile

  • Docker:

git clone https://github.com/factisresearch/Frozone.git
cd Frozone
docker build --rm -t [your_name_here]/frozone docker

Run

  • Docker
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) -d -p 8080:8080 [your_name_here]/frozone
  • Without docker
./Frozone [config_file]

Usage

In your development repository, you'll need a .frozone.yml where you define your cook-file directory, your entry point and boring file. Example:

cookDir: server/cook
entryPoint: 07_fullbuild.cook
boringFile: .boring

(For more information on this, see dockercook)

Then write your cook files. To upload a darcs patch from your repository to Frozone, this script will help you:

#!/bin/bash

if [[ "$1" == "" || "$2" == "" || "$1" == "--help" || "$1" == "-h" ]]; then
    echo "USAGE: $0 YOUR-EMAIL TARGET-REPO"
    exit 1
fi

REPO=$2
EMAIL=$1
FROZONE_HOST="http://localhost:8080" # ADJUST THIS!
PATCHFILE="/tmp/bundle-$RANDOM.dpatch"

darcs send $REPO -o $PATCHFILE

echo "Uploading patches ($PATCHFILE) to $FROZONE_HOST ..."
RESP=$(curl --form "email=$EMAIL" --form "target-repo=$REPO" --form "patch-bundle=@$PATCHFILE" -s "$FROZONE_HOST/bundle/check")
if [[ $RESP == *message* ]]
then
    echo "Ready. You'll be notified at $EMAIL"
else
    echo "Some shit happened. Check the frozone log!"
fi
rm -rf $PATCHFILE

Send patches to Frozone by calling this script.

Todo

  • Continous deployment
  • Hooks (Post-success, etc.)

About

blazingly fast continuous integration and delivery using docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published