From bd1dcc8ab079957b73fab5c2bb3c1be354ddfddf Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Mon, 14 Oct 2024 09:22:51 +0000 Subject: [PATCH] Move all commonly modified variables to config.mk --- Makefile | 10 +--------- config.mk | 4 ++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b188bd5..287f5d9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,5 @@ include config.mk -.DEFAULT_GOAL := all - # Disabled due to https://github.com/containers/buildah/issues/5581 #REPO_STAMP := push-stamp #REPO_PATH := repo/ @@ -17,9 +15,6 @@ include config.mk # oci:${REPO_PATH}:$*:latest # touch $@ -MANIFEST_FILE = ${IMAGE_DIR}/manifest.json -BUILD_INSTRUCTIONS = Containerfile - # Autogenerated lists CONTAINERS := $(shell find ./ -name '${BUILD_INSTRUCTIONS}' -exec 'dirname' '{}' ';' | cut -d'/' -f2-) IMAGE_DIRS := $(addsuffix /${IMAGE_DIR},${CONTAINERS}) @@ -31,9 +26,6 @@ MANIFESTS := $(addsuffix /${MANIFEST_FILE},${CONTAINERS}) # Inserting literal commas into function calls without interpreting them as delimiters , := , -# Build all containers in order by default -all: unified - unified: $(MANIFESTS) # $(REPO_STAMPS) localbuild: $(BUILD_IDS) @@ -48,7 +40,7 @@ localbuild: $(BUILD_IDS) %/${BUILD_ID_OUT}: %/${BUILD_INSTRUCTIONS} buildah build \ --jobs 0 \ - --network=none \ + --network=${CONTAINER_NETWORK} \ --logfile=$*/${BUILD_LOG} \ -t $*:latest \ --iidfile $@ \ diff --git a/config.mk b/config.mk index a73be69..3a1bfd0 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,9 @@ IMAGE_DIR := image BUILD_ID_OUT := build_id BUILD_LOG := build_log +MANIFEST_FILE := ${IMAGE_DIR}/manifest.json +BUILD_INSTRUCTIONS := Containerfile +CONTAINER_NETWORK := host +.DEFAULT_GOAL := unified include */config.mk