forked from raintank/worldping-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
36 lines (34 loc) · 1.02 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
machine:
services:
- docker
environment:
GOPATH: "/home/ubuntu/.go_workspace"
IMPORTPATH: "/home/ubuntu/.go_workspace/src/github.com/raintank/worldping-api"
GODIST: "go1.8.1.linux-amd64.tar.gz"
post:
- mkdir -p download
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST
dependencies:
override:
- scripts/depends.sh
- scripts/build.sh
- scripts/build_docker.sh
general:
artifacts:
- build/
test:
override:
- cd $IMPORTPATH && test -z "$(gofmt -s -l main.go ./pkg/* | tee /dev/stderr)"
- cd $IMPORTPATH && go test -v $(go list ./... | grep -v /vendor/)
- cd $IMPORTPATH && go vet $(go list ./... | grep -v /vendor/)
post:
- scripts/packaging.sh
deployment:
production:
branch: master
commands:
- scripts/deploy.sh
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- scripts/deploy_docker.sh