Public | Automated Build

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

drone-golang-container

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

Usage

docker pull nycmonkey/drone-golang-container

Sample .drone.yml file for your Go project

image: nycmonkey/drone-golang-container
env:
  - GOPATH=/var/cache/drone/src/github.com/<username>/<repository>/Godeps/_workspace:/var/cache/drone
script:
  - go build -v ./...
  - go test -v ./...
notify:
  email:
    recipients:
      - person@email-address.com

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

$ go get github.com/tools/godep

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
Owner
nycmonkey