summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Strassner <strassner.bryan@gmail.com>2019-02-06 16:30:10 -0600
committerBryan Strassner <strassner.bryan@gmail.com>2019-02-06 16:55:00 -0600
commit919868e16c86bf18ef6403cbef5fe625cbfb7eed (patch)
treea672eb8270d09779cd0ec38dab5732b39ebcdb32
parentc7472d7f607bb1ee0202cebd9706754f5bb7decf (diff)
Use UBUNTU_BASE_IMAGE instead of BASE_IMAGE
Offering better alignment with some downstream build jobs. Change-Id: I90332926b4e5dd04b00b6008d06d36624086e313
Notes
Notes (review): Code-Review+2: Sean Eagan <sean.eagan@att.com> Code-Review+1: Drew Walters <drewwalters96@gmail.com> Code-Review+2: Aaron Sheffield <ajs@sheffieldfamily.net> Workflow+1: Aaron Sheffield <ajs@sheffieldfamily.net> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 07 Feb 2019 21:02:28 +0000 Reviewed-on: https://review.openstack.org/635352 Project: openstack/airship-shipyard Branch: refs/heads/master
-rw-r--r--Makefile39
1 files changed, 5 insertions, 34 deletions
diff --git a/Makefile b/Makefile
index 3faa37c..d964b27 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ PROXY ?= http://proxy.foo.com:8000
31NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local 31NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
32USE_PROXY ?= false 32USE_PROXY ?= false
33 33
34BASE_IMAGE ?= 34UBUNTU_BASE_IMAGE ?=
35 35
36IMAGE:=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$(IMAGE_NAME):${IMAGE_TAG} 36IMAGE:=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$(IMAGE_NAME):${IMAGE_TAG}
37IMAGE_DIR:=images/$(IMAGE_NAME) 37IMAGE_DIR:=images/$(IMAGE_NAME)
@@ -45,7 +45,7 @@ images: $(IMAGE_NAME)
45$(IMAGE_NAME): 45$(IMAGE_NAME):
46 @echo 46 @echo
47 @echo "===== Processing [$@] image =====" 47 @echo "===== Processing [$@] image ====="
48 @make build_$@ IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} IMAGE_DIR=images/$@ IMAGE_NAME=$@ 48 @make build IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} IMAGE_DIR=images/$@ IMAGE_NAME=$@
49 @make run IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} SCRIPT=./tools/$@_image_run.sh 49 @make run IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} SCRIPT=./tools/$@_image_run.sh
50 50
51# Build all docker images for this project 51# Build all docker images for this project
@@ -81,39 +81,10 @@ tests:
81run: 81run:
82 USE_PROXY=$(USE_PROXY) PROXY=$(PROXY) $(SCRIPT) $(IMAGE) 82 USE_PROXY=$(USE_PROXY) PROXY=$(PROXY) $(SCRIPT) $(IMAGE)
83 83
84_BASE_IMAGE_ARG := $(if $(BASE_IMAGE),--build-arg FROM="${BASE_IMAGE}" ,) 84_BASE_IMAGE_ARG := $(if $(UBUNTU_BASE_IMAGE),--build-arg FROM="${UBUNTU_BASE_IMAGE}" ,)
85 85
86.PHONY: build_airflow 86.PHONY: build
87build_airflow: 87build:
88ifeq ($(USE_PROXY), true)
89 docker build --network host -t $(IMAGE) --label $(LABEL) \
90 --label "org.opencontainers.image.revision=$(COMMIT)" \
91 --label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
92 --label "org.opencontainers.image.title=$(IMAGE_NAME)" \
93 -f $(IMAGE_DIR)/Dockerfile \
94 $(_BASE_IMAGE_ARG) \
95 --build-arg http_proxy=$(PROXY) \
96 --build-arg https_proxy=$(PROXY) \
97 --build-arg HTTP_PROXY=$(PROXY) \
98 --build-arg HTTPS_PROXY=$(PROXY) \
99 --build-arg no_proxy=$(NO_PROXY) \
100 --build-arg NO_PROXY=$(NO_PROXY) \
101 --build-arg ctx_base=$(BUILD_CTX) .
102else
103 docker build --network host -t $(IMAGE) --label $(LABEL) \
104 --label "org.opencontainers.image.revision=$(COMMIT)" \
105 --label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
106 --label "org.opencontainers.image.title=$(IMAGE_NAME)" \
107 -f $(IMAGE_DIR)/Dockerfile \
108 $(_BASE_IMAGE_ARG) \
109 --build-arg ctx_base=$(BUILD_CTX) .
110endif
111ifeq ($(PUSH_IMAGE), true)
112 docker push $(IMAGE)
113endif
114
115.PHONY: build_shipyard
116build_shipyard:
117ifeq ($(USE_PROXY), true) 88ifeq ($(USE_PROXY), true)
118 docker build --network host -t $(IMAGE) --label $(LABEL) \ 89 docker build --network host -t $(IMAGE) --label $(LABEL) \
119 --label "org.opencontainers.image.revision=$(COMMIT)" \ 90 --label "org.opencontainers.image.revision=$(COMMIT)" \