diff --git a/Makefile b/Makefile index 9b9d54f4..b48b6fcf 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,15 @@ BASE_BRANCH ?= devel OCM_BASE_BRANCH ?= main IMAGES ?= shipyard-dapper-base shipyard-linting nettest +LOCAL_COMPONENTS := submariner-metrics-proxy MULTIARCH_IMAGES ?= nettest EXTRA_PRELOAD_IMAGES := $(PRELOAD_IMAGES) PLATFORMS ?= linux/amd64,linux/arm64 NON_DAPPER_GOALS += images multiarch-images PLUGIN ?= +export LOCAL_COMPONENTS + export BASE_BRANCH OCM_BASE_BRANCH ifneq (,$(DAPPER_HOST_ARCH)) diff --git a/Makefile.inc b/Makefile.inc index faa00927..f018b0a7 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -191,7 +191,7 @@ upgrade-e2e: deploy-latest deploy e2e # This uses make deploy, but forcefully ignores images so that images # are *not* rebuilt (we want to deploy the published images only) deploy-latest: - $(MAKE) -o images -o preload-images deploy SUBCTL_VERSION=latest IMAGE_TAG=subctl using=$(using) + $(MAKE) -o images -o preload-images deploy SUBCTL_VERSION=latest IMAGE_TAG=subctl LOCAL_COMPONENTS= using=$(using) ##### MISC TARGETS ##### .PHONY: backport post-mortem unit diff --git a/scripts/shared/deploy.sh b/scripts/shared/deploy.sh index 247c4428..13d81cda 100755 --- a/scripts/shared/deploy.sh +++ b/scripts/shared/deploy.sh @@ -173,3 +173,16 @@ run_if_defined post_deploy # Print installed versions for manual validation of CI subctl show versions print_clusters_message + +# If there are any local components, check that the deployed versions are the newly-built versions +if [ -n "$LOCAL_COMPONENTS" ]; then + for component in $LOCAL_COMPONENTS; do + for version in $(subctl show versions | awk "/$component/ { print \$4 }"); do + # shellcheck disable=SC2153 # VERSION is provided externally + if [ "$version" != "$VERSION" ]; then + printf "Expected version %s of component %s, but got %s.\n" "$VERSION" "$component" "$version" + exit 1 + fi + done + done +fi