surrealpatch/.circleci/config.yml

35 lines
1 KiB
YAML
Raw Normal View History

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