forked from janetkuo/kubebot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
52 lines (46 loc) · 1.59 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
52
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
environment:
PROJECT_NAME: orangesys
CLOUDSDK_COMPUTE_ZONE: asia-northeast1-c
GOPATH: "/home/ubuntu/.go_workspace"
ORG_PATH: "github.com/orangesys"
REPO_PATH: "${ORG_PATH}/orangeapi"
GODIST: "go1.7.4.linux-amd64.tar.gz"
post:
- 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
services:
- docker
dependencies:
override:
- rm -rf ${GOPATH}/src/${REPO_PATH}
- mkdir -p ${GOPATH}/src/${ORG_PATH}
- cp -r ~/kubebot ${GOPATH}/src/${ORG_PATH}
test:
override:
- ./build-go:
parallel: true
- ./build.sh
- docker images
general:
branches:
ignore:
- /^(?!master).*$/
deployment:
release:
tag: /^v[0-9]+(\.[0-9]+)*/
owner: orangesys
commands:
- sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update
- echo $GCLOUD_SERVICE_KEY | base64 --decode -i > ${HOME}/account-auth.json
- sudo /opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file ${HOME}/account-auth.json
- sudo /opt/google-cloud-sdk/bin/gcloud config set project $PROJECT_NAME
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push orangesys/alpine-kubebot
- ./deploy.sh
- docker logout
- curl -X POST https://hooks.microbadger.com/images/orangesys/alpine-kubebot/Xo7CselBT7Vg9j06ZdP6LX3Lj6M=