2016-07-04 10:31:46 +00:00
|
|
|
# -----------------------------------
|
|
|
|
|
|
|
|
general:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
# -----------------------------------
|
|
|
|
|
|
|
|
machine:
|
|
|
|
timezone:
|
|
|
|
UTC
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
# -----------------------------------
|
|
|
|
|
2016-07-04 12:53:07 +00:00
|
|
|
checkout:
|
|
|
|
post:
|
|
|
|
# git tags are used to generate build info which is baked into the
|
|
|
|
# binary, but unfortunately it is not possible to fetch all tags
|
|
|
|
# without also unshallowing the checkout, so we must do both.
|
|
|
|
- git fetch --unshallow --tags
|
|
|
|
# GOPATH is cached, so we need to clean out the version from the previous
|
|
|
|
# run or the subsequent `mv` will fail.
|
|
|
|
- rm -rf "${GOPATH%%:*}/src/github.com/abcum/surreal"
|
|
|
|
- mkdir -p "${GOPATH%%:*}/src/github.com/abcum/"
|
|
|
|
- mv ~/surreal "${GOPATH%%:*}/src/github.com/abcum/"
|
|
|
|
- ln -s "${GOPATH%%:*}/src/github.com/abcum/surreal" ~/surreal
|
|
|
|
|
|
|
|
# -----------------------------------
|
|
|
|
|
2016-07-04 10:31:46 +00:00
|
|
|
dependencies:
|
|
|
|
override:
|
|
|
|
- docker info
|
|
|
|
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
2016-07-04 11:47:13 +00:00
|
|
|
- go get -u github.com/Masterminds/glide
|
2016-07-04 10:31:46 +00:00
|
|
|
|
|
|
|
# -----------------------------------
|
|
|
|
|
|
|
|
test:
|
|
|
|
override:
|
|
|
|
- make test
|
|
|
|
- make build
|
2016-07-04 10:35:23 +00:00
|
|
|
- docker build -t abcum/surreal .
|
2016-07-04 10:31:46 +00:00
|
|
|
- docker run -d abcum/surreal start; sleep 15
|
|
|
|
|
|
|
|
# -----------------------------------
|
|
|
|
|
|
|
|
deployment:
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
branch: master
|
|
|
|
commands:
|
|
|
|
- docker push abcum/surreal
|