Move all commonly modified variables to config.mk
This commit is contained in:
parent
2e80cbb967
commit
bd1dcc8ab0
10
Makefile
10
Makefile
|
@ -1,7 +1,5 @@
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
.DEFAULT_GOAL := all
|
|
||||||
|
|
||||||
# Disabled due to https://github.com/containers/buildah/issues/5581
|
# Disabled due to https://github.com/containers/buildah/issues/5581
|
||||||
#REPO_STAMP := push-stamp
|
#REPO_STAMP := push-stamp
|
||||||
#REPO_PATH := repo/
|
#REPO_PATH := repo/
|
||||||
|
@ -17,9 +15,6 @@ include config.mk
|
||||||
# oci:${REPO_PATH}:$*:latest
|
# oci:${REPO_PATH}:$*:latest
|
||||||
# touch $@
|
# touch $@
|
||||||
|
|
||||||
MANIFEST_FILE = ${IMAGE_DIR}/manifest.json
|
|
||||||
BUILD_INSTRUCTIONS = Containerfile
|
|
||||||
|
|
||||||
# Autogenerated lists
|
# Autogenerated lists
|
||||||
CONTAINERS := $(shell find ./ -name '${BUILD_INSTRUCTIONS}' -exec 'dirname' '{}' ';' | cut -d'/' -f2-)
|
CONTAINERS := $(shell find ./ -name '${BUILD_INSTRUCTIONS}' -exec 'dirname' '{}' ';' | cut -d'/' -f2-)
|
||||||
IMAGE_DIRS := $(addsuffix /${IMAGE_DIR},${CONTAINERS})
|
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
|
# Inserting literal commas into function calls without interpreting them as delimiters
|
||||||
, := ,
|
, := ,
|
||||||
|
|
||||||
# Build all containers in order by default
|
|
||||||
all: unified
|
|
||||||
|
|
||||||
unified: $(MANIFESTS) # $(REPO_STAMPS)
|
unified: $(MANIFESTS) # $(REPO_STAMPS)
|
||||||
localbuild: $(BUILD_IDS)
|
localbuild: $(BUILD_IDS)
|
||||||
|
|
||||||
|
@ -48,7 +40,7 @@ localbuild: $(BUILD_IDS)
|
||||||
%/${BUILD_ID_OUT}: %/${BUILD_INSTRUCTIONS}
|
%/${BUILD_ID_OUT}: %/${BUILD_INSTRUCTIONS}
|
||||||
buildah build \
|
buildah build \
|
||||||
--jobs 0 \
|
--jobs 0 \
|
||||||
--network=none \
|
--network=${CONTAINER_NETWORK} \
|
||||||
--logfile=$*/${BUILD_LOG} \
|
--logfile=$*/${BUILD_LOG} \
|
||||||
-t $*:latest \
|
-t $*:latest \
|
||||||
--iidfile $@ \
|
--iidfile $@ \
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
IMAGE_DIR := image
|
IMAGE_DIR := image
|
||||||
BUILD_ID_OUT := build_id
|
BUILD_ID_OUT := build_id
|
||||||
BUILD_LOG := build_log
|
BUILD_LOG := build_log
|
||||||
|
MANIFEST_FILE := ${IMAGE_DIR}/manifest.json
|
||||||
|
BUILD_INSTRUCTIONS := Containerfile
|
||||||
|
CONTAINER_NETWORK := host
|
||||||
|
.DEFAULT_GOAL := unified
|
||||||
|
|
||||||
include */config.mk
|
include */config.mk
|
||||||
|
|
Loading…
Reference in New Issue