diff --git a/build.sh b/build.sh index e0a25761..5d4b59aa 100755 --- a/build.sh +++ b/build.sh @@ -16,6 +16,7 @@ DOCKERFILE_PATH="" # Perform docker build but append the LABEL with GIT commit id at the end function docker_build_with_version { local dockerfile="$1" + [ -n "$(echo "${EXCLUDE_VERSIONS}" | grep ${dir}.${OS})" ] && echo "-> $OS build of version $dir found in EXCLUDED_VERSIONS, skipping build." && return [ ! -e "$dockerfile" ] && echo "-> $dockerfile for version $dir does not exist, skipping build." && return echo "-> Version ${dir}: building image from '${dockerfile}' ..." diff --git a/common.mk b/common.mk index 4c2e0198..ae4eed3b 100644 --- a/common.mk +++ b/common.mk @@ -21,7 +21,8 @@ script_env = \ UPDATE_BASE=$(UPDATE_BASE) \ OS=$(OS) \ CLEAN_AFTER=$(CLEAN_AFTER) \ - OPENSHIFT_NAMESPACES="$(OPENSHIFT_NAMESPACES)" + OPENSHIFT_NAMESPACES="$(OPENSHIFT_NAMESPACES)" \ + EXCLUDE_VERSIONS="$(EXCLUDE_VERSIONS)" .PHONY: build build: $(VERSIONS)