@@ -63,7 +63,7 @@ export CONFIGMAP_SERVER_IMAGE ?= quay.io/operator-framework/configmap-operator-r
63
63
64
64
PKG := github.com/operator-framework/operator-lifecycle-manager
65
65
IMAGE_REPO ?= quay.io/operator-framework/olm
66
- IMAGE_TAG ?= "dev "
66
+ IMAGE_TAG ?= "local "
67
67
68
68
# Go build settings #
69
69
@@ -103,7 +103,7 @@ KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST) use -p path $(KUBE_MINOR).x)
103
103
# Kind node image tags are in the format x.y.z we pin to version x.y.0 because patch releases and node images
104
104
# are not guaranteed to be available when a new version of the kube apis is released
105
105
KIND_CLUSTER_IMAGE := kindest/node:v$(KUBE_MINOR ) .0
106
- KIND_CLUSTER_NAME ?= kind-olmv0
106
+ export KIND_CLUSTER_NAME ?= kind-olmv0
107
107
108
108
# Targets #
109
109
# Disable -j flag for make
@@ -145,6 +145,10 @@ image: export GOOS = linux
145
145
image : clean build # HELP Build image image for linux on host architecture
146
146
docker build -t $(IMAGE_REPO ) :$(IMAGE_TAG ) -f Dockerfile bin
147
147
148
+ .PHONE : build-e2e-fixture-images
149
+ build-e2e-fixture-images : # HELP Build images for e2e testing
150
+ ./scripts/e2e_test_fixtures.sh
151
+
148
152
.PHONY : e2e-build
149
153
# the e2e and experimental_metrics tags are required to get e2e tests to pass
150
154
# search the code for go:build e2e or go:build experimental_metrics to see where these tags are used
@@ -207,13 +211,17 @@ kind-clean: $(KIND) #HELP Delete kind cluster $KIND_CLUSTER_NAME (default: kind-
207
211
208
212
.PHONY : kind-create
209
213
kind-create : kind-clean # HELP Create a new kind cluster $KIND_CLUSTER_NAME (default: kind-olmv0)
210
- $( KIND ) create cluster --name $( KIND_CLUSTER_NAME ) --image $( KIND_CLUSTER_IMAGE ) $( KIND_CREATE_OPTS )
214
+ ./scripts/kind_with_registry.sh
211
215
$(KIND ) export kubeconfig --name $(KIND_CLUSTER_NAME )
212
216
217
+ .PHONY : load-test-images
218
+ load-test-images : # HELP Load the OLM images into the kind cluster's registry
219
+ ./scripts/e2e_test_fixtures.sh --push-to=" localhost:5001"
220
+
213
221
.PHONY : deploy
214
- OLM_IMAGE := quay.io/operator-framework/olm:local
222
+ OLM_IMAGE ?= $( IMAGE_REPO ) : $( IMAGE_TAG )
215
223
deploy : $(KIND ) $(HELM ) # HELP Deploy OLM to kind cluster $KIND_CLUSTER_NAME (default: kind-olmv0) using $OLM_IMAGE (default: quay.io/operator-framework/olm:local)
216
- $(KIND ) load docker-image $(OLM_IMAGE ) --name $(KIND_CLUSTER_NAME ) ; \
224
+ $(KIND ) load docker-image $(OLM_IMAGE ) --name $(KIND_CLUSTER_NAME )
217
225
$(HELM ) upgrade --install olm deploy/chart \
218
226
--set debug=true \
219
227
--set olm.image.ref=$(OLM_IMAGE ) \
@@ -247,8 +255,7 @@ E2E_TIMEOUT ?= 90m
247
255
E2E_TEST_NS ?= operators
248
256
E2E_INSTALL_NS ?= operator-lifecycle-manager
249
257
E2E_CATALOG_NS ?= $(E2E_INSTALL_NS )
250
- E2E_FLAKE_ATTEMPTS ?= 1
251
- GINKGO_OPTS += -v -randomize-suites -race -trace --show-node-events --flake-attempts=$(E2E_FLAKE_ATTEMPTS ) $(if $(E2E_SEED ) ,-seed '$(E2E_SEED ) ') $(if $(TEST ) ,-focus '$(TEST ) ',) $(if $(SKIP ) , -skip '$(SKIP ) ')
258
+ GINKGO_OPTS += -v -randomize-suites -race -trace --show-node-events $(if $(E2E_FLAKE_ATTEMPTS ) ,-flake-attempts=$(E2E_FLAKE_ATTEMPTS ) ) $(if $(E2E_SEED ) ,-seed '$(E2E_SEED ) ' ) $(if $(TEST ) ,-focus '$(TEST ) ', ) $(if $(SKIP ) , -skip '$(SKIP ) ')
252
259
253
260
.PHONY : e2e
254
261
e2e : # HELP Run e2e tests against a cluster running OLM (params: $E2E_TEST_NS (operator), $E2E_INSTALL_NS (operator-lifecycle-manager), $E2E_CATALOG_NS (operator-lifecycle-manager), $E2E_TIMEOUT (90m), $E2E_FLAKE_ATTEMPTS (1), $TEST(undefined))
0 commit comments