Skip to content

Commit 70ee9ff

Browse files
committed
Add upgrade e2es for standard to experimental
Signed-off-by: Todd Short <tshort@redhat.com>
1 parent dde685c commit 70ee9ff

2 files changed

Lines changed: 91 additions & 24 deletions

File tree

.github/workflows/e2e.yaml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
flags: experimental-e2e
7676
token: ${{ secrets.CODECOV_TOKEN }}
7777

78-
upgrade-e2e:
78+
upgrade-st2st-e2e:
7979
runs-on: ubuntu-latest
8080
steps:
8181
- uses: actions/checkout@v6
@@ -85,15 +85,15 @@ jobs:
8585
go-version-file: go.mod
8686

8787
- name: Run the upgrade e2e test
88-
run: ARTIFACT_PATH=/tmp/artifacts make test-upgrade-e2e
88+
run: ARTIFACT_PATH=/tmp/artifacts make test-upgrade-st2st-e2e
8989

9090
- uses: actions/upload-artifact@v5
9191
if: failure()
9292
with:
93-
name: upgrade-e2e-artifacts
93+
name: upgrade-st2st-e2e-artifacts
9494
path: /tmp/artifacts/
9595

96-
upgrade-experimental-e2e:
96+
upgrade-ex2ex-e2e:
9797
runs-on: ubuntu-latest
9898
steps:
9999
- uses: actions/checkout@v6
@@ -103,11 +103,47 @@ jobs:
103103
go-version-file: go.mod
104104

105105
- name: Run the upgrade e2e test
106-
run: ARTIFACT_PATH=/tmp/artifacts make test-upgrade-experimental-e2e
106+
run: ARTIFACT_PATH=/tmp/artifacts make test-upgrade-ex2ex-e2e
107107

108108
- uses: actions/upload-artifact@v5
109109
if: failure()
110110
with:
111-
name: upgrade-experimental-e2e-artifacts
111+
name: upgrade-ex2ex-e2e-artifacts
112+
path: /tmp/artifacts/
113+
114+
upgrade-st2ex-e2e:
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@v6
118+
119+
- uses: actions/setup-go@v6
120+
with:
121+
go-version-file: go.mod
122+
123+
- name: Run the upgrade e2e test
124+
run: ARTIFACT_PATH=/tmp/artifacts make test-upgrade-st2ex-e2e
125+
126+
- uses: actions/upload-artifact@v5
127+
if: failure()
128+
with:
129+
name: upgrade-st2ex-e2e-artifacts
130+
path: /tmp/artifacts/
131+
132+
st2ex-e2e:
133+
runs-on: ubuntu-latest
134+
steps:
135+
- uses: actions/checkout@v6
136+
137+
- uses: actions/setup-go@v6
138+
with:
139+
go-version-file: go.mod
140+
141+
- name: Run the upgrade e2e test
142+
run: ARTIFACT_PATH=/tmp/artifacts make test-st2ex-e2e
143+
144+
- uses: actions/upload-artifact@v5
145+
if: failure()
146+
with:
147+
name: st2ex-e2e-artifacts
112148
path: /tmp/artifacts/
113149

Makefile

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ test-extension-developer-e2e: run-internal image-registry extension-developer-e2
303303

304304
.PHONY: run-latest-release
305305
run-latest-release:
306+
@echo -e "\n\U23EC Using $(RELEASE_INSTALL) as release installer\n"
306307
curl -L -s https://github.com/operator-framework/operator-controller/releases/latest/download/$(notdir $(RELEASE_INSTALL)) | bash -s
307308

308309
.PHONY: pre-upgrade-setup
@@ -316,24 +317,41 @@ post-upgrade-checks:
316317

317318
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
318319

319-
.PHONY: test-upgrade-e2e
320-
test-upgrade-e2e: SOURCE_MANIFEST := $(STANDARD_MANIFEST)
321-
test-upgrade-e2e: RELEASE_INSTALL := $(STANDARD_RELEASE_INSTALL)
322-
test-upgrade-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-e2e
323-
test-upgrade-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
324-
test-upgrade-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
325-
test-upgrade-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
326-
test-upgrade-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade e2e tests on a local kind cluster
327-
328-
.PHONY: test-upgrade-experimental-e2e
329-
test-upgrade-experimental-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_MANIFEST)
330-
test-upgrade-experimental-e2e: RELEASE_INSTALL := $(EXPERIMENTAL_RELEASE_INSTALL)
331-
test-upgrade-experimental-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-experimental-e2e
332-
test-upgrade-experimental-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
333-
test-upgrade-experimental-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
334-
test-upgrade-experimental-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
335-
test-upgrade-experimental-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade e2e tests on a local kind cluster
336-
320+
.PHONY: test-upgrade-st2st-e2e
321+
test-upgrade-st2st-e2e: SOURCE_MANIFEST := $(STANDARD_MANIFEST)
322+
test-upgrade-st2st-e2e: RELEASE_INSTALL := $(STANDARD_RELEASE_INSTALL)
323+
test-upgrade-st2st-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-st2st-e2e
324+
test-upgrade-st2st-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
325+
test-upgrade-st2st-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
326+
test-upgrade-st2st-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
327+
test-upgrade-st2st-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade (standard -> standard) e2e tests on a local kind cluster
328+
329+
.PHONY: test-upgrade-ex2ex-e2e
330+
test-upgrade-ex2ex-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_MANIFEST)
331+
test-upgrade-ex2ex-e2e: RELEASE_INSTALL := $(EXPERIMENTAL_RELEASE_INSTALL)
332+
test-upgrade-ex2ex-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-ex2ex-e2e
333+
test-upgrade-ex2ex-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
334+
test-upgrade-ex2ex-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
335+
test-upgrade-ex2ex-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
336+
test-upgrade-ex2ex-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade (experimental -> experimental) e2e tests on a local kind cluster
337+
338+
.PHONY: test-upgrade-st2ex-e2e
339+
test-upgrade-st2ex-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_MANIFEST)
340+
test-upgrade-st2ex-e2e: RELEASE_INSTALL := $(STANDARD_RELEASE_INSTALL)
341+
test-upgrade-st2ex-e2e: KIND_CLUSTER_NAME := operator-controller-upgrade-st2ex-e2e
342+
test-upgrade-st2ex-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
343+
test-upgrade-st2ex-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
344+
test-upgrade-st2ex-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
345+
test-upgrade-st2ex-e2e: $(TEST_UPGRADE_E2E_TASKS) #HELP Run upgrade (standard -> experimental) e2e tests on a local kind cluster
346+
347+
.PHONY: test-st2ex-e2e
348+
test-st2ex-e2e: SOURCE_MANIFEST := $(STANDARD_MANIFEST)
349+
test-st2ex-e2e: RELEASE_INSTALL := $(STANDARD_RELEASE_INSTALL)
350+
test-st2ex-e2e: KIND_CLUSTER_NAME := operator-controller-st2ex-e2e
351+
test-st2ex-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
352+
test-st2ex-e2e: export TEST_CLUSTER_CATALOG_NAME := test-catalog
353+
test-st2ex-e2e: export TEST_CLUSTER_EXTENSION_NAME := test-package
354+
test-st2ex-e2e: run-internal image-registry pre-upgrade-setup kind-deploy-experimental post-upgrade-checks kind-clean #HELP Run swichover (standard -> experimental) e2e tests on a local kind cluster
337355

338356
.PHONY: e2e-coverage
339357
e2e-coverage:
@@ -375,6 +393,18 @@ kind-deploy: manifests
375393
cp $(CATALOGS_MANIFEST) $(DEFAULT_CATALOG)
376394
envsubst '$$DEFAULT_CATALOG,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
377395

396+
.PHONY: kind-deploy-experimental
397+
kind-deploy-experimental: export DEFAULT_CATALOG := $(RELEASE_CATALOGS)
398+
kind-deploy-experimental: SOURCE_MANIFEST := $(EXPERIMENTAL_MANIFEST)
399+
kind-deploy-experimental: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
400+
kind-deploy-experimental: NAMESPACE := olmv1-system
401+
# Have to be a _completely_ separate recipe, rather than having `kind-deploy` as a dependency, because `make` will think it was already built
402+
kind-deploy-experimental: manifests
403+
@echo -e "\n\U1F4D8 Using $(SOURCE_MANIFEST) as source manifest\n"
404+
sed "s/cert-git-version/cert-$(VERSION)/g" $(SOURCE_MANIFEST) > $(MANIFEST)
405+
cp $(CATALOGS_MANIFEST) $(DEFAULT_CATALOG)
406+
envsubst '$$DEFAULT_CATALOG,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
407+
378408
.PHONY: kind-cluster
379409
kind-cluster: $(KIND) kind-verify-versions #EXHELP Standup a kind cluster.
380410
-$(KIND) delete cluster --name $(KIND_CLUSTER_NAME)
@@ -452,6 +482,7 @@ run-experimental: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
452482
run-experimental: run-internal #HELP Build the operator-controller then deploy it with the experimental manifest into a new kind cluster.
453483

454484
CATD_NAMESPACE := olmv1-system
485+
.PHONY: wait
455486
wait:
456487
kubectl wait --for=condition=Available --namespace=$(CATD_NAMESPACE) deployment/catalogd-controller-manager --timeout=60s
457488
kubectl wait --for=condition=Ready --namespace=$(CATD_NAMESPACE) certificate/catalogd-service-cert # Avoid upgrade test flakes when reissuing cert

0 commit comments

Comments
 (0)