Build and test using Docker

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
Ben Firshman 2014-12-08 16:46:40 -08:00
parent 54de0cf03f
commit e42afabd03
7 changed files with 16 additions and 7 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
machine*

2
.gitignore vendored
View File

@ -1 +1 @@
machine machine*

View File

@ -4,4 +4,4 @@ go:
script: script:
- script/validate-dco - script/validate-dco
- script/validate-gofmt - script/validate-gofmt
- script/test - go test -v ./...

View File

@ -1,2 +1,5 @@
FROM golang:onbuild FROM golang:1.3-cross
ENTRYPOINT ["machine"] RUN go get github.com/mitchellh/gox
ENV GOPATH /go/src/github.com/docker/machine/Godeps/_workspace:/go
WORKDIR /go/src/github.com/docker/machine
ADD . /go/src/github.com/docker/machine

View File

@ -108,7 +108,8 @@ To build, run:
$ go get github.com/docker/machine $ go get github.com/docker/machine
$ cd $GOPATH/src/github.com/docker/machine $ cd $GOPATH/src/github.com/docker/machine
$ script/build $ script/build
$ ./machine
That will create binaries for various platforms in the current directory.
If you have any questions we're in #docker-machine on Freenode. If you have any questions we're in #docker-machine on Freenode.

View File

@ -1,2 +1,4 @@
#!/bin/sh #!/bin/sh
GOPATH=`pwd`/Godeps/_workspace:$GOPATH go build set -e
docker build -t docker-machine .
exec docker run --rm -v `pwd`:/go/src/github.com/docker/machine docker-machine gox -os="darwin linux" -parallel=5

View File

@ -1,2 +1,4 @@
#!/bin/sh #!/bin/sh
GOPATH=`pwd`/Godep/_workspace:$GOPATH go test -v ./... set -e
docker build -t docker-machine .
exec docker run --rm docker-machine go test -v ./...