From 46cd26d52c31f2438ca9ab109e4e4dc0d328bc05 Mon Sep 17 00:00:00 2001 From: David Zhu Date: Mon, 27 Aug 2018 13:50:19 -0700 Subject: [PATCH] Makefile clarification for staging image, error if not set --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index cd3660a8c..7c3af472c 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Args: +# GCE_PD_CSI_STAGING_IMAGE: Staging image repository + STAGINGIMAGE=${GCE_PD_CSI_STAGING_IMAGE} STAGINGVERSION=latest @@ -25,6 +28,9 @@ gce-pd-driver: go build -ldflags "-X main.vendorVersion=${STAGINGVERSION}" -o bin/gce-pd-csi-driver ./cmd/ build-container: + ifndef GCE_PD_CSI_STAGING_IMAGE + $(error "Must set environment variable GCE_PD_CSI_STAGING_IMAGE to staging image repository") + endif docker build --build-arg TAG=$(STAGINGVERSION) -t $(STAGINGIMAGE):$(STAGINGVERSION) . push-container: build-container