-
Notifications
You must be signed in to change notification settings - Fork 2
/
circle.yml
43 lines (39 loc) · 1.17 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
machine:
environment:
GOPATH: /home/ubuntu/.go_workspace
IMPORT_PATH: github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
services:
- docker
general:
build_dir: ../.go_workspace/src/$IMPORT_PATH
checkout:
pre:
- rm -rf $GOPATH/src/$IMPORT_PATH
- mkdir -p $(dirname $GOPATH/src/$IMPORT_PATH)
- ln -s $HOME/$CIRCLE_PROJECT_REPONAME $GOPATH/src/$IMPORT_PATH
dependencies:
pre:
- go get -u github.com/kardianos/govendor
override:
- make build
post:
- cp $CIRCLE_PROJECT_REPONAME $CIRCLE_ARTIFACTS
- docker info
- docker pull objectpartners/$CIRCLE_PROJECT_REPONAME:latest || true
- scripts/build.sh objectpartners/$CIRCLE_PROJECT_REPONAME
test:
override:
- make test
deployment:
master:
branch: master
owner: objectpartners
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- scripts/push.sh objectpartners/$CIRCLE_PROJECT_REPONAME
release:
tag: /[0-9]+(\.[0-9]+)*/
owner: objectpartners
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- scripts/tag_and_push.sh objectpartners/$CIRCLE_PROJECT_REPONAME $CIRCLE_TAG