Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the deployed version of local components #1809

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
2 changes: 1 addition & 1 deletion Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions scripts/shared/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading