Skip to content

Commit

Permalink
Add EXCLUDE_VERSIONS to explicitly provide which versions not to build
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubatrh committed Aug 10, 2017
1 parent bc6fca5 commit 1f9bc3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}' ..."

Expand Down
3 changes: 2 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1f9bc3a

Please sign in to comment.