Skip to content

Commit be4e87e

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

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-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: 19 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

@@ -296,7 +293,7 @@ test-extension-developer-e2e: run image-registry extension-developer-e2e kind-cl
296293

297294
.PHONY: run-latest-release
298295
run-latest-release:
299-
curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/$(notdir $(STANDARD_RELEASE_INSTALL)) | bash -s
296+
curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/$(notdir $(RELEASE_INSTALL)) | bash -s
300297

301298
.PHONY: pre-upgrade-setup
302299
pre-upgrade-setup:
@@ -306,11 +303,27 @@ pre-upgrade-setup:
306303
post-upgrade-checks:
307304
go test -count=1 -v ./test/upgrade-e2e/...
308305

306+
307+
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
308+
309309
.PHONY: test-upgrade-e2e
310+
test-upgrade-e2e: SOURCE_MANIFEST := $(STANDARD_MANIFEST)
311+
test-upgrade-e2e: RELEASE_INSTALL := $(STANDARD_RELEASE_INSTALL)
310312
test-upgrade-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-e2e
313+
test-upgrade-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
311314
test-upgrade-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
312315
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
316+
test-upgrade-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade e2e tests on a local kind cluster
317+
318+
.PHONY: test-upgrade-experimental-e2e
319+
test-upgrade-experimental-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_MANIFEST)
320+
test-upgrade-experimental-e2e: RELEASE_INSTALL := $(EXPERIMENTAL_RELEASE_INSTALL)
321+
test-upgrade-experimental-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-experimental-e2e
322+
test-upgrade-experimental-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
323+
test-upgrade-experimental-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
324+
test-upgrade-experimental-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
325+
test-upgrade-experimental-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade e2e tests on a local kind cluster
326+
314327

315328
.PHONY: e2e-coverage
316329
e2e-coverage:
@@ -324,7 +337,6 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND
324337
$(CONTAINER_RUNTIME) save $(CATD_IMG) | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
325338

326339
.PHONY: kind-deploy
327-
kind-deploy: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
328340
kind-deploy: export DEFAULT_CATALOG := $(RELEASE_CATALOGS)
329341
kind-deploy: manifests
330342
@echo -e "\n\U1F4D8 Using $(SOURCE_MANIFEST) as source manifest\n"
@@ -396,6 +408,7 @@ go-build-linux: export GOARCH=amd64
396408
go-build-linux: $(BINARIES)
397409

398410
.PHONY: run
411+
run: SOURCE_MANIFEST := $(STANDARD_MANIFEST)
399412
run: docker-build kind-cluster kind-load kind-deploy wait #HELP Build the operator-controller then deploy it into a new kind cluster.
400413

401414
.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)