paprika

command module
v0.0.0-...-f2f6987 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2014 License: MIT Imports: 4 Imported by: 0

README

Cider

Cider is a framework for implementing continuous integration servers.

Overview

Cider is a set of Meeko agents that can be used to implement a simple continuous integration (CI) server.

Cider itself contains:

  • the build slave agent, and
  • the build trigger agent.

Meeko itself acts as the build master component.

Right now there is no component that handles the build output, this must be implemented in some other agent. This is actually not that critical as it may seem, check the Tips and Tricks section.

The Build Slave Agent

The first and the most important component that is included is the build slave agent. It exports certain methods over the Meeko RPC service. These methods can be then called by other agents to trigger builds on the relevant build slaves.

Every build slave is associated with a set of labels and a set of runners. The labels are just some user-defined strings that represent the environment of the build slave. It can be e.g. linux-ubuntu-14.04 or macosx-10.9. The set of runners is generated when the slave is started and it describes what script executors are available on the target system. The available runners are:

  • bash - bash
  • node - node
  • powershell - PowerShell.exe
  • cmd - cmd.exe

The slave automatically activates the runners that can be found in PATH.

Once the labels and runners are known, the build slave connects to the Meeko RPC service and it exports methods schematically looking like cider.LABEL.RUNNER. The slave just does a Cartesian product, so the number of methods exported is |labels| * |runners|.

Certain information must be supplied as the method arguments:

Name Type Description
repository string Meeko-compatible repository URL
script string the relative path of the script to be executed
env []string the list of environment variables to be defined for the script

The build slave then clones/pulls the specified repository and uses the relevant runner to run the specified script. The variables defined in env are exported for the build script. The build output is being streamed back to the requested using the RPC service. Once the build is finished, the following value is returned

Name Type Description
pullDuration time.Duration time spent pulling the repository
buildDuration time.Duration time spent running the script
error string error message, if any

The return code is 0 on success, 1 on failure.

The Build Trigger Agent

The second agent, available as cider build subcommand, can be used to trigger builds remotely. The usage is explained in the example repository.

Installation

You will need Go 1.1 or higher.

Usage

The help output of the cider command is rather verbose, so the best thing to do is to run cider -h.

Example

See the example repository.

Benchmarks

See the benchmark subdirectory for more details.

Discussion

You can join the mailing list.

Status

This is very very much still in development, use at your own risk.

Tips and Tricks

Cider can be used to simply add build slaves to other CI servers. All that is necessary is to run cider build from within the other CI server. That will stream the build output to the console and the other CI server will take care of saving of the build output. This is very handy in case you fancy certain CI server solution, but you need a build slave environment that is not supported. This happens quite often with the hosted CI solutions. Usually only Linux build slaves are supported.

Contributing

See CONTRIBUTING.md.

License

MIT, see the LICENSE file.

About the Original Authors

tchap started with this project because he was too fed up with other continuous integration servers.

Cider is going to be used at Salsita.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go.net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
_workspace/src/github.com/cihub/seelog
Package seelog implements logging functionality with flexible dispatching, filtering, and formatting.
Package seelog implements logging functionality with flexible dispatching, filtering, and formatting.
_workspace/src/github.com/dmotylev/nutrition
Package nutrition provides decoding of different sources based on user defined struct.
Package nutrition provides decoding of different sources based on user defined struct.
_workspace/src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
_workspace/src/github.com/meeko/meekod/daemon
This package wraps the meekod functionality into a Daemon struct that can be imported and started inside of any Go program.
This package wraps the meekod functionality into a Daemon struct that can be imported and started inside of any Go program.
_workspace/src/github.com/pebbe/zmq3
A Go interface to ZeroMQ (zmq, 0mq) version 3.
A Go interface to ZeroMQ (zmq, 0mq) version 3.
bstar - Binary Star reactor.
_workspace/src/github.com/pebbe/zmq3/examples/clone
Clone client API stack (multithreaded).
Clone client API stack (multithreaded).
_workspace/src/github.com/pebbe/zmq3/examples/flcliapi
flcliapi - Freelance Pattern agent class.
flcliapi - Freelance Pattern agent class.
Interface class for Chapter 8.
_workspace/src/github.com/pebbe/zmq3/examples/kvmsg
kvmsg class - key-value message class for example applications
kvmsg class - key-value message class for example applications
_workspace/src/github.com/pebbe/zmq3/examples/kvsimple
kvsimple - simple key-value message class for example applications.
kvsimple - simple key-value message class for example applications.
_workspace/src/github.com/pebbe/zmq3/examples/mdapi
Majordomo Protocol Client and Worker API.
Majordomo Protocol Client and Worker API.
_workspace/src/github.com/tchap/go-exchange/exchange
go-exchange is an in-process message (or event) exchange, for now featuring the publish-subscribe messaging pattern.
go-exchange is an in-process message (or event) exchange, for now featuring the publish-subscribe messaging pattern.
_workspace/src/github.com/tchap/gocli
gocli is yet another package to aid with parsing command line arguments.
gocli is yet another package to aid with parsing command line arguments.
_workspace/src/github.com/ugorji/go/codec
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
_workspace/src/github.com/wsxiaoys/terminal/color
The colors package provide a simple way to bring colorful charcaters to terminal interface.
The colors package provide a simple way to bring colorful charcaters to terminal interface.
_workspace/src/gopkg.in/yaml.v1
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.
_workspace/src/labix.org/v2/mgo
Package mgo offers a rich MongoDB driver for Go.
Package mgo offers a rich MongoDB driver for Go.
_workspace/src/labix.org/v2/mgo/bson
Package bson is an implementation of the BSON specification for Go:
Package bson is an implementation of the BSON specification for Go:
_workspace/src/labix.org/v2/mgo/sasl
Package sasl is an implementation detail of the mgo package.
Package sasl is an implementation detail of the mgo package.
_workspace/src/labix.org/v2/mgo/txn
The txn package implements support for multi-document transactions.
The txn package implements support for multi-document transactions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL