Skip to content

Update circle.yml to support PR builds #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ machine:
- docker
environment:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
PRIVATE_REGISTRY: us.gcr.io/code_climate
image_name: codeclimate-eslint

dependencies:
pre:
- echo $gcloud_json_key_base64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
- curl https://sdk.cloud.google.com | bash
- gcloud auth activate-service-account $gcloud_account_email --key-file /tmp/gcloud_key.json
- gcloud docker -a

test:
override:
- docker build -t=$registry_root/$image_name:b$CIRCLE_BUILD_NUM .
- docker build -t=$PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .

deployment:
registry:
branch: master
owner: codeclimate
commands:
- docker push $registry_root/$image_name:b$CIRCLE_BUILD_NUM
- echo $gcloud_json_key_base64 | sed 's/ //g' | base64 -d > /tmp/gcloud_key.json
- curl https://sdk.cloud.google.com | bash
- gcloud auth activate-service-account $gcloud_account_email --key-file /tmp/gcloud_key.json
- gcloud docker -a
- docker push $PRIVATE_REGISTRY/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM

notify:
webhooks:
- url: https://cc-slack-proxy.herokuapp.com/circle