Skip to content

Commit b066e72

Browse files
committed
Makefile: add test-upgrade-experimental-e2e
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
1 parent 0e0e706 commit b066e72

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

.github/workflows/e2e.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,22 @@ jobs:
9292
with:
9393
name: upgrade-e2e-artifacts
9494
path: /tmp/artifacts/
95+
96+
upgrade-experimental-e2e:
97+
runs-on: ubuntu-latest
98+
steps:
99+
- uses: actions/checkout@v5
100+
101+
- uses: actions/setup-go@v5
102+
with:
103+
go-version-file: go.mod
104+
105+
- name: Run the upgrade e2e test
106+
run: ARTIFACT_PATH=/tmp/artifacts make test-upgrade-experimental-e2e
107+
108+
- uses: actions/upload-artifact@v4
109+
if: failure()
110+
with:
111+
name: upgrade-experimental-e2e-artifacts
112+
path: /tmp/artifacts/
113+

Makefile

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ EXPERIMENTAL_MANIFEST := ./manifests/experimental.yaml
9090
EXPERIMENTAL_E2E_MANIFEST := ./manifests/experimental-e2e.yaml
9191
CATALOGS_MANIFEST := ./manifests/default-catalogs.yaml
9292

93-
# Manifest used by kind-deploy, which may be overridden by other targets
94-
SOURCE_MANIFEST := $(STANDARD_MANIFEST)
95-
9693
# Disable -j flag for make
9794
.NOTPARALLEL:
9895

@@ -274,13 +271,15 @@ test-e2e: SOURCE_MANIFEST := $(STANDARD_E2E_MANIFEST)
274271
test-e2e: KIND_CLUSTER_NAME := operator-controller-e2e
275272
test-e2e: GO_BUILD_EXTRA_FLAGS := -cover
276273
test-e2e: COVERAGE_NAME := e2e
274+
test-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
277275
test-e2e: run image-registry prometheus e2e e2e-coverage kind-clean #HELP Run e2e test suite on local kind cluster
278276

279277
.PHONY: test-experimental-e2e
280278
test-experimental-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_E2E_MANIFEST)
281279
test-experimental-e2e: KIND_CLUSTER_NAME := operator-controller-e2e
282280
test-experimental-e2e: GO_BUILD_EXTRA_FLAGS := -cover
283281
test-experimental-e2e: COVERAGE_NAME := experimental-e2e
282+
test-experimental-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
284283
test-experimental-e2e: run image-registry prometheus experimental-e2e e2e e2e-coverage kind-clean #HELP Run experimental e2e test suite on local kind cluster
285284

286285
.PHONY: prometheus
@@ -290,13 +289,15 @@ prometheus: #EXHELP Deploy Prometheus into specified namespace
290289
./hack/test/install-prometheus.sh $(PROMETHEUS_NAMESPACE) $(PROMETHEUS_VERSION) $(KUSTOMIZE) $(VERSION)
291290

292291
.PHONY: test-extension-developer-e2e
292+
test-extension-developer-e2e: SOURCE_MANIFEST := $(STANDARD_E2E_MANIFEST)
293293
test-extension-developer-e2e: KIND_CLUSTER_NAME := operator-controller-ext-dev-e2e
294294
test-extension-developer-e2e: export INSTALL_DEFAULT_CATALOGS := false
295+
test-extension-developer-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
295296
test-extension-developer-e2e: run image-registry extension-developer-e2e kind-clean #HELP Run extension-developer e2e on local kind cluster
296297

297298
.PHONY: run-latest-release
298299
run-latest-release:
299-
curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/$(notdir $(STANDARD_RELEASE_INSTALL)) | bash -s
300+
curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/$(notdir $(RELEASE_INSTALL)) | bash -s
300301

301302
.PHONY: pre-upgrade-setup
302303
pre-upgrade-setup:
@@ -306,11 +307,27 @@ pre-upgrade-setup:
306307
post-upgrade-checks:
307308
go test -count=1 -v ./test/upgrade-e2e/...
308309

310+
311+
TEST_UPGRADE_E2E_TASKS := kind-cluster run-latest-release image-registry pre-upgrade-setup docker-build kind-load kind-deploy post-upgrade-checks kind-clean
312+
309313
.PHONY: test-upgrade-e2e
314+
test-upgrade-e2e: SOURCE_MANIFEST := $(STANDARD_MANIFEST)
315+
test-upgrade-e2e: RELEASE_INSTALL := $(STANDARD_RELEASE_INSTALL)
310316
test-upgrade-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-e2e
317+
test-upgrade-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
311318
test-upgrade-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
312319
test-upgrade-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
313-
test-upgrade-e2e: kind-cluster run-latest-release image-registry pre-upgrade-setup docker-build kind-load kind-deploy post-upgrade-checks kind-clean #HELP Run upgrade e2e tests on a local kind cluster
320+
test-upgrade-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade e2e tests on a local kind cluster
321+
322+
.PHONY: test-upgrade-experimental-e2e
323+
test-upgrade-experimental-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_MANIFEST)
324+
test-upgrade-experimental-e2e: RELEASE_INSTALL := $(EXPERIMENTAL_RELEASE_INSTALL)
325+
test-upgrade-experimental-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-experimental-e2e
326+
test-upgrade-experimental-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
327+
test-upgrade-experimental-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
328+
test-upgrade-experimental-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
329+
test-upgrade-experimental-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade e2e tests on a local kind cluster
330+
314331

315332
.PHONY: e2e-coverage
316333
e2e-coverage:
@@ -324,7 +341,6 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND
324341
$(CONTAINER_RUNTIME) save $(CATD_IMG) | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
325342

326343
.PHONY: kind-deploy
327-
kind-deploy: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
328344
kind-deploy: export DEFAULT_CATALOG := $(RELEASE_CATALOGS)
329345
kind-deploy: manifests
330346
@echo -e "\n\U1F4D8 Using $(SOURCE_MANIFEST) as source manifest\n"
@@ -396,6 +412,7 @@ go-build-linux: export GOARCH=amd64
396412
go-build-linux: $(BINARIES)
397413

398414
.PHONY: run
415+
run: SOURCE_MANIFEST := $(STANDARD_MANIFEST)
399416
run: docker-build kind-cluster kind-load kind-deploy wait #HELP Build the operator-controller then deploy it into a new kind cluster.
400417

401418
.PHONY: run-experimental

hack/test/pre-upgrade-setup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ rules:
109109
verbs:
110110
- get
111111
- list
112+
- watch
112113
- create
113114
- update
115+
- patch
114116
- delete
115117
- apiGroups:
116118
- "olm.operatorframework.io"

0 commit comments

Comments
 (0)