Circle ci

This commit is contained in:
emile 2015-09-14 11:28:33 +02:00
parent f92337db52
commit a2a493ae18

22
circle.yml Normal file
View file

@ -0,0 +1,22 @@
machine:
services:
- docker
environment:
REPO: $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
dependencies:
pre:
- CGO_ENABLED=0 go build -a -installsuffix nocgo .
override:
- echo $REPO
- docker build -t ${REPO,,} .
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push ${REPO,,}:latest
- docker tag ${REPO,,}:latest ${REPO,,}:$CIRCLE_SHA1
- docker push ${REPO,,}:$CIRCLE_SHA1
- docker -H tcp://$HOST_DEPLOY:5000 run -d -p 80:80 ${REPO,,}