mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
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:
parent
2ba72e2786
commit
e296098131
12
Makefile
12
Makefile
@ -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
|
||||
|
10
circle.yml
10
circle.yml
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user