machine:
  services:
    - docker
  environment:
    CLOUDSDK_CORE_DISABLE_PROMPTS: 1

test:
  override:
    - bundle exec rake
    - docker build -t=$registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .

deployment:
  registry:
    branch: master
    commands:
      - 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 --key-file /tmp/gcloud_key.json
      - gcloud docker -a
      - docker push $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM

machine:
  services:
    - docker
  environment:
    CLOUDSDK_CORE_DISABLE_PROMPTS: 1
    registry_root: us.gcr.io/code_climate

test:
  override:
    - bundle exec rake
    - docker build -t=$registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM .

deployment:
  registry:
    branch: master
    commands:
      - 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 --key-file /tmp/gcloud_key.json
      - gcloud docker -a
      - docker push $registry_root/$CIRCLE_PROJECT_REPONAME:b$CIRCLE_BUILD_NUM

Define registry_root in Circle yaml
Define registry_root in Circle yaml
