GithubHelp home page GithubHelp logo

isabella232 / drone-exec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from objectpartners/drone-exec

0.0 0.0 0.0 147 KB

Agent for executing Drone builds in Docker containers

License: Apache License 2.0

Go 100.00%

drone-exec's Introduction

Drone build agent that executes builds in Docker containers.

Building

Use the following commands to build:

export GO15VENDOREXPERIMENT=1

go build
go test ./...

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:

./drone-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' } } }"
}
EOF

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:

# compile the binary for the correct architecture
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 go build

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

Vendoring

Using the vexp utility to vendor dependencies:

go get https://github.com/kr/vexp
./vexp

drone-exec's People

Contributors

bradrydzewski avatar sqs avatar tam7t avatar donny-dont avatar msteinert avatar philwitty avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.