Docker Push of new builds (#192)

* wip

* add build step

* remove filter?

* circle does not rebuild on force push

* circle does not rebuild on force push

* add branch filter

* use build flag on builder

* push

* add circle env variable set

* redeploy
This commit is contained in:
Victor Vrantchan 2016-09-19 18:54:57 -04:00 committed by Mike Arpaia
parent 2ba72e2786
commit e296098131
2 changed files with 21 additions and 1 deletions

View File

@ -21,6 +21,13 @@ REVISION = $(shell git rev-parse HEAD)
GOVERSION = $(shell go version | awk '{print $$3}')
NOW = $(shell date +"%Y%m%d-%T")
USER = $(shell whoami)
DOCKER_IMAGE_NAME = kolide/kolide
ifndef CIRCLE_PR_NUMBER
DOCKER_IMAGE_TAG = dev-unset
else
DOCKER_IMAGE_TAG = dev-${CIRCLE_PR_NUMBER}
endif
build: .prefix
go build -o ${OUTPUT} -ldflags "\
@ -66,6 +73,11 @@ distclean:
rm -rf assets/bundle.js
rm -rf vendor/*
docker-build-circle:
@echo ">> building docker image"
docker build -t "${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" .
docker push "${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}"
docker:
docker pull kolide/kolide-builder:1.7
docker run --rm -it -v $(shell pwd):/go/src/github.com/kolide/kolide-ose -v ${GOPATH}/pkg:/go/pkg kolide/kolide-builder:1.7 -B

View File

@ -14,4 +14,12 @@ dependencies:
test:
override:
- docker run -v $(pwd):/go/src/github.com/kolide/kolide-ose -v /home/ubuntu/.go_workspace/pkg:/go/pkg kolide/kolide-builder:1.7 -C
- docker run -v $(pwd):/go/src/github.com/kolide/kolide-ose -v /home/ubuntu/.go_workspace/pkg:/go/pkg kolide/kolide-builder:1.7 -B
deployment:
development:
branch: /^((?!master).)*$/ # not the master branch
commands:
- make docker-build-circle