-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircle.yml
More file actions
30 lines (27 loc) · 1.09 KB
/
circle.yml
File metadata and controls
30 lines (27 loc) · 1.09 KB
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
general:
branches:
only:
- master
dependencies:
pre:
- echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
- sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update
- sudo /opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
- sudo /opt/google-cloud-sdk/bin/gcloud config set project $GCLOUD_PROJECT
- go get -t -d -v ./...
- go build -v
test:
override:
- go test -v -race ./...
deployment:
prod:
branch: master
commands:
# Add Hal to Gogeta server
- ssh -i ~/.ssh/id_circle-ci boomer@35.187.20.26 sudo service hal stop
- sudo scp -i ~/.ssh/id_circle-ci Hal boomer@35.187.20.26:/var/www/go/bin
- ssh -i ~/.ssh/id_circle-ci boomer@35.187.20.26 sudo service hal start
# Add Hal to Mr.robot server
- ssh -i ~/.ssh/id_circle-ci boomer@35.187.57.120 sudo service hal stop
- sudo scp -i ~/.ssh/id_circle-ci Hal boomer@35.187.57.120:/var/www/go/bin
- ssh -i ~/.ssh/id_circle-ci boomer@35.187.57.120 sudo service hal start