File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -39,3 +39,13 @@ test-e2e-skip-build-and-push:
39
39
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./config/capz/manager_pull_policy.yaml" PULL_POLICY=IfNotPresent
40
40
MANAGER_IMAGE=$(CONTROLLER_IMG ) -$(ARCH ) :$(TAG ) \
41
41
$(MAKE ) test-e2e-run
42
+
43
+ .PHONY : test-e2e-custom-image
44
+ test-e2e-custom-image : # # Run e2e tests with a custom image format (use MANAGER_IMAGE env var).
45
+ @if [ -z " $( MANAGER_IMAGE) " ]; then \
46
+ echo " MANAGER_IMAGE must be set" ; \
47
+ exit 1; \
48
+ fi
49
+ $(MAKE ) set-manifest-image MANIFEST_IMG=$(shell echo $(MANAGER_IMAGE ) | cut -d: -f1) MANIFEST_TAG=$(shell echo $(MANAGER_IMAGE ) | cut -d: -f2) TARGET_RESOURCE=" ./config/capz/manager_image_patch.yaml"
50
+ $(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./config/capz/manager_pull_policy.yaml" PULL_POLICY=IfNotPresent
51
+ $(MAKE ) test-e2e-run
Original file line number Diff line number Diff line change @@ -82,7 +82,14 @@ trap capz::ci-e2e::cleanup EXIT
82
82
# Image is configured as `${CONTROLLER_IMG}-${ARCH}:${TAG}` where `CONTROLLER_IMG` is defaulted to `${REGISTRY}/${IMAGE_NAME}`.
83
83
if [[ " ${BUILD_MANAGER_IMAGE} " == " false" ]]; then
84
84
# Load an existing image, skip docker-build and docker-push.
85
- make test-e2e-skip-build-and-push
85
+ if [[ -n " ${CUSTOM_MANAGER_IMAGE:- } " ]]; then
86
+ # Use custom image format when CUSTOM_MANAGER_IMAGE is set
87
+ export MANAGER_IMAGE=" ${CUSTOM_MANAGER_IMAGE} "
88
+ make test-e2e-custom-image
89
+ else
90
+ # Use default image format
91
+ make test-e2e-skip-build-and-push
92
+ fi
86
93
elif [[ " ${USE_LOCAL_KIND_REGISTRY} " == " true" ]]; then
87
94
# Build an image with kind local registry, skip docker-push. REGISTRY is set to `localhost:5000/ci-e2e`. TAG is set to `$(date -u '+%Y%m%d%H%M%S')`.
88
95
make test-e2e-skip-push
You can’t perform that action at this time.
0 commit comments