Skip to content

Commit

Permalink
feat(Makefile): set docker build flags via environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma committed Jan 20, 2017
1 parent 550d5ae commit 30d2caa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ branches:
- master
services:
- docker
env:
- DOCKER_BUILD_FLAGS="--pull --no-cache"
sudo: required
script:
- make bootstrap docker-build test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build:
@echo Nothing to do.

docker-build:
docker build --pull --rm -t ${IMAGE} rootfs
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
docker tag ${IMAGE} ${MUTABLE_IMAGE}

deploy: docker-build docker-push
Expand Down
1 change: 1 addition & 0 deletions versioning.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MUTABLE_VERSION ?= canary
VERSION ?= git-$(shell git rev-parse --short HEAD)
DOCKER_BUILD_FLAGS ?= --pull

IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${VERSION}
MUTABLE_IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION}
Expand Down

0 comments on commit 30d2caa

Please sign in to comment.