Skip to content

Commit 759d616

Browse files
committed
Update CircleCI config
1 parent e1fcf18 commit 759d616

File tree

2 files changed

+32
-25
lines changed

2 files changed

+32
-25
lines changed

.circleci/config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

circle.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)