forked from TF2Stadium/Helen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
46 lines (42 loc) · 1.46 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
machine:
services:
- postgresql
- docker
environment:
DATABASE_NAME: "circle_test"
DATABASE_USERNAME: "ubuntu"
DATABASE_PASSWORD: ""
GO15VENDOREXPERIMENT: 1
dependencies:
pre:
- go get github.com/jteeuwen/go-bindata/...
- go get github.com/Masterminds/glide
- make assets -B
- glide install
deployment:
master:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- mkdir binaries
- make static -B
- docker build -t tf2stadium/helen:latest .
- docker push tf2stadium/helen:latest
- cp Helen binaries/helen-prod
- cp -R views binaries/views
- cp binaries/helen-prod $CIRCLE_ARTIFACTS/helen
- rsync -rl -e "ssh -p $SSH_PORT" binaries/* [email protected]:$BACKEND_DEPLOY_PATH_PROD
- ssh -p $SSH_PORT [email protected] $BACKEND_DEPLOY_SCRIPT_PROD
dev:
branch: dev
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- mkdir binaries
- make static -B
- docker build -t tf2stadium/helen:dev .
- docker push tf2stadium/helen:dev
- cp Helen binaries/helen-dev
- cp -R views binaries/views
- cp binaries/helen-dev $CIRCLE_ARTIFACTS/helen
- rsync -rl -e "ssh -p $SSH_PORT" binaries/* [email protected]:$BACKEND_DEPLOY_PATH_DEV
- ssh -p $SSH_PORT [email protected] $BACKEND_DEPLOY_SCRIPT_DEV