surrealpatch/.circleci/config.yml
2018-11-29 12:45:56 +00:00

37 lines
1.1 KiB
YAML

version: 2
jobs:
build:
docker:
- image: abcum/circle-golang:latest
environment:
GOOGLE_APPLICATION_CREDENTIALS: /root/gcloud-service-key.json
working_directory: /go/src/github.com/abcum/surreal
steps:
- checkout
- run:
name: Auth
command: gcauth
- run:
name: Clean
command: make clean
- run:
name: Setup
command: make setup
- run:
name: Tests
command: make tests
- run:
name: Build
command: make build
- setup_remote_docker
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker build -t abcum/surreal .
docker push abcum/surreal
gcloud docker -- build -t abcum/surreal .
gcloud docker -- tag abcum/surreal:latest eu.gcr.io/surreal-io/surreal:latest
gcloud docker -- push eu.gcr.io/surreal-io/surreal:latest
fi