-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
35 lines (31 loc) · 1 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
machine:
services:
- docker
environment:
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
REPO_USER: elcolio
DOCKER_REPO_LOGIN: elcolio
DOCKER_EMAIL: cole.brumley@gmail.com
CGO_ENABLED: 0
GO15VENDOREXPERIMENT: 1
GOPATH: /home/ubuntu/.go_workspace
dependencies:
override:
- sudo add-apt-repository ppa:masterminds/glide -y
- sudo apt-get update
- sudo apt-get install glide -y
- docker login -e $DOCKER_EMAIL -u $DOCKER_REPO_LOGIN -p $DOCKER_PASS
- mkdir -p "${GOPATH}/src/${IMPORT_PATH}"
- rsync -azC --delete ./ "${GOPATH}/src/${IMPORT_PATH}/"
test:
pre:
- cd "${GOPATH}/src/${IMPORT_PATH}/" && glide install
override:
- cd ${GOPATH}/src/${IMPORT_PATH}/ && make build
- pwd; cp -a ${GOPATH}/src/${IMPORT_PATH}/bin/* $CIRCLE_ARTIFACTS/
deployment:
latest:
branch: master
commands:
- cd "${GOPATH}/src/${IMPORT_PATH}/" && make docker
- docker push ${REPO_USER}/${CIRCLE_PROJECT_REPONAME}:latest