surrealpatch/.circleci/config.yml

38 lines
1.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:
2017-11-16 20:21:55 +00:00
name: Setup
command: make setup
2017-03-28 11:12:00 +00:00
- 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 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
2017-11-16 20:21:55 +00:00
fi