CiscoCloud/drone-exec

Name: drone-exec

Owner: CiscoCloud

Description: Agent for executing Drone builds in Docker containers

Created: 2016-02-16 20:31:20.0

Updated: 2016-02-16 20:31:21.0

Pushed: 2016-02-17 19:37:13.0

Homepage: null

Size: 155

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Drone build agent that executes builds in Docker containers.

Building

Use the following commands to build:

rt GO15VENDOREXPERIMENT=1

uild
est ./...
Running

You can run the program locally for testing purposes. The build details are provided to the program via a JSON payload as seen below:

one-exec --debug --pull --cache --clone --build <<EOF

"system": {
    "link": "http://localhost:8000"
},
"workspace": {},
"repo": {
    "owner": "garyburd",
    "name": "redigo",
    "full_name": "garyburd/redigo",
    "link_url": "https://github.com/garyburd/redigo",
    "clone_url": "git://github.com/garyburd/redigo.git"
},
"build": {
    "number": 1,
    "ref": "refs/heads/master",
    "commit": "d8dbe4d94f15fe89232e0402c6e8a0ddf21af3ab",
    "branch": "master"
},
"job": {
    "environment": {}
},
"config": "{ build: { image: 'golang:1.4.2', commands: ['cd redis', 'go build', 'go test -v']}, compose: { redis: { image: 'redis:2.8' } } }"


Note that the above program expects access to a Docker daemon. It will provision all the necessary build containers, execute your build, and then cleanup and remove the build environment.

Docker

Use the following commands to build the Docker image:

mpile the binary for the correct architecture
=linux GOARCH=amd64 CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 go build

ild the docker image, adding the above binary
er build --rm=true -t drone/drone-exec .
Vendoring

Using the vexp utility to vendor dependencies:

et https://github.com/kr/vexp
xp

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.