forked from peterbourgon/go-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
51 lines (47 loc) · 1.6 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
machine:
services:
- docker
environment:
PATH: "/usr/local/go/bin:${HOME}/bin:${PATH}"
GOROOT: ""
GOPATH: "${HOME}"
GODIST: "go1.7.1.linux-amd64.tar.gz"
pre:
- wget -O pact.tar.gz https://github.com/pact-foundation/pact-go/releases/download/v0.0.2/linux-amd64.tar.gz
- tar zxf pact.tar.gz
post:
- ./pact-go_linux_amd64 daemon:
background: true
checkout:
post:
- echo Downloading and installing $GODIST
- 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
- echo Using canonical single GOPATH $GOPATH
- mkdir -p ${GOPATH}/src/github.com/peterbourgon
- mv ${HOME}/go-microservices ${GOPATH}/src/github.com/peterbourgon
- ln -s ${GOPATH}/src/github.com/peterbourgon/go-microservices ${HOME}/go-microservices # Circle needs this to be here, apparently
- cd ${GOPATH}/src/github.com/peterbourgon/go-microservices
dependencies:
cache_directories:
- "~/download"
test:
override:
- go get -d -t ./addsvc/...
- go test -v ./addsvc/...
post:
- |
cd ${GOPATH}/src/github.com/peterbourgon/go-microservices/addsvc
make
deployment:
push:
branch: master
commands:
- |
docker login -e "$DOCKER_REGISTRY_EMAIL" -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD"
IMAGE_TAG="peterbourgon/addsvc:$(./misc/image-tag)"
echo Pushing $IMAGE_TAG
docker tag peterbourgon/addsvc "$IMAGE_TAG"
docker push "$IMAGE_TAG"