dependencies:
  pre:
    - echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
    - sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update
    - sudo /opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
    - sudo /opt/google-cloud-sdk/bin/gcloud config set project $GCLOUD_PROJECT
    - go get -t -d -v ./...
    - go build -v

test:
  override:
    - go test -v -race ./...

deployment:
  prod:
    branch: master
    commands:
      - ssh -i ~/.ssh/circle-ci boomer@35.187.20.26 echo test

dependencies:
  pre:
    - echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
    - sudo /opt/google-cloud-sdk/bin/gcloud --quiet components update
    - sudo /opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
    - sudo /opt/google-cloud-sdk/bin/gcloud config set project $GCLOUD_PROJECT
    - go get -t -d -v ./...
    - go build -v

test:
  override:
    - go test -v -race ./...

deployment:
  prod:
    branch: master
    commands:
      - ssh -i ~/.ssh/circle-ci boomer@35.187.20.26 echo test
      - sudo /opt/google-cloud-sdk/bin/gcloud compute copy-files <artifact> <instance_name:path_to_artifact>
      - sudo /opt/google-cloud-sdk/bin/gcloud compute copy-files /usr/local/go/bin/go/Hal boomer@gogeta-instance-1:/var/www/go/bin

Copy Hal binary to server
Copy Hal binary to server
