From 49728fa7e3b2316b7cbe9225b292fdbe9e18f54a Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Tue, 1 Aug 2023 09:11:14 +0200 Subject: [PATCH] Error out from load-iib when INDEX_IMAGES is undefined If you call the load-iib target you *must* set INDEX_IMAGES, so let's error out properly if you do not. Tested as: $ unset INDEX_IMAGES $ make load-iib make -f common/Makefile load-iib make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' No INDEX_IMAGES defined. Bailing out $ export INDEX_IMAGES=foo make load-iib make -f common/Makefile load-iib make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops' PLAY [IIB CI playbook] *** --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 83871b7e..d8182da6 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,9 @@ load-iib: ## CI target to install Index Image Bundles for IIB in $(shell echo $(INDEX_IMAGES) | tr ',' '\n'); do \ INDEX_IMAGE="$${IIB}" ansible-playbook common/ansible/playbooks/iib-ci/iib-ci.yaml; \ done; \ + else \ + echo "No INDEX_IMAGES defined. Bailing out"; \ + exit 1; \ fi