File tree Expand file tree Collapse file tree 2 files changed +32
-25
lines changed Expand file tree Collapse file tree 2 files changed +32
-25
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+ jobs :
3
+ build :
4
+ machine : true
5
+ environment :
6
+ CLOUDSDK_CORE_DISABLE_PROMPTS : 1
7
+ PRIVATE_REGISTRY : us.gcr.io/code_climate
8
+
9
+ steps :
10
+ # CircleCI 2.0 doesn't expand env vars yet so we have to do it manually.
11
+ - run :
12
+ name : Env
13
+ command : |
14
+ echo 'export IMAGE_NAME="${PRIVATE_REGISTRY}/${CIRCLE_PROJECT_REPONAME}:b${CIRCLE_BUILD_NUM}"' >> ${BASH_ENV}
15
+ - checkout
16
+ - run :
17
+ name : Build image
18
+ command : make image
19
+ - run :
20
+ name : Deployment
21
+ command : |
22
+ if [ "${CIRCLE_BRANCH}" == "master" ]; then
23
+ echo $gcloud_json_key_base64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
24
+ curl https://sdk.cloud.google.com | bash
25
+ gcloud auth activate-service-account --key-file /tmp/gcloud_key.json
26
+ gcloud docker -a
27
+ docker push ${IMAGE_NAME}
28
+ fi
29
+
30
+ notify :
31
+ webhooks :
32
+ - url : https://cc-slack-proxy.herokuapp.com/circle
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments