Skip to content

Commit 2018bba

Browse files
author
Douglas Greiman
authored
Merge pull request GoogleCloudPlatform#37 from GoogleCloudPlatform/dgreiman/image-name
Ensure 'make build|tests|benchmarks' are using the same image
2 parents 7d87e8f + dd68108 commit 2018bba

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ ifdef FORCE_REBUILD
22
DOCKER_FLAGS = --no-cache --pull
33
endif
44

5-
IMAGE_NAME ?= google/python
5+
# Note: 'make build/tests/benchmarks' share images by retagging the
6+
# candidate as 'google/python'. So this could cause trouble with
7+
# concurrent builds on the same machine.
8+
CANDIDATE_NAME ?= $(shell date +%Y-%m-%d_%H_%M)
9+
IMAGE_NAME ?= google/python:$(CANDIDATE_NAME)
610

711
.PHONY: build
812
build: build-interpreters
913
docker build $(DOCKER_FLAGS) -t "$(IMAGE_NAME)" .
14+
docker tag -f "$(IMAGE_NAME)" "google/python"
1015

1116
.PHONY: build-interpreters
1217
build-interpreters:

0 commit comments

Comments
 (0)