Public | Automated Build

Last pushed: a year ago
Short Description
Docker image for Drone to build Go projects during CI
Full Description


A simple Docker container for Drone to use while building and testing your Go projects during continuous integration.


docker pull nycmonkey/drone-golang-container

Sample .drone.yml file for your Go project

image: nycmonkey/drone-golang-container
  - GOPATH=/var/cache/drone/src/<username>/<repository>/Godeps/_workspace:/var/cache/drone
  - go build -v ./...
  - go test -v ./...

The above example assumes you are building a Go project that used godep to vendor any library dependencies:

$ go get

Once you can build your project with go install and test it with go test, run the following command to vendor the dependencies:

$ godep save -r

Pointers for setting up your own continuous integration server

I use a Digital Ocean "droplet" running Drone on CoreOS linux. It costs me $10/month for the droplet plus the cost of registering a domain and maintaining a signed SSL certificate. Digital Ocean has a helpful setup guide here.

By default, CoreOS updates itself automatically and reboots. To ensure that Drone starts up upon reboot, you can write a systemd unit file.

Docker Pull Command