Skip to content

Commit 0f4ccd6

Browse files
authored
Adding an operator-upgrade CI job. (kubernetes-sigs#693) (kubernetes-sigs#1022)
This test will ensure the bundle built in the PR can be used to upgrade from the last bundle available of KMM. Signed-off-by: Yoni Bettan <[email protected]>
1 parent 3e68898 commit 0f4ccd6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

ci/prow/operator-upgrade

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
make operator-sdk
6+
oc create namespace openshift-kmm
7+
8+
# Set the pull secret in Docker's auth file so operator-sdk can pull the current bundle image
9+
mkdir -p ~/.docker
10+
oc get secret/pull-secret -n openshift-config -o json | jq -r '.data[".dockerconfigjson"]' | base64 --decode | jq > ~/.docker/config.json
11+
12+
# Get the latest bundle image published
13+
latest_published_bundle=$(grpcurl -d '{"pkgName": "kernel-module-management", "channelName": "stable"}' -plaintext redhat-operators.openshift-marketplace.svc:50051 api.Registry/GetBundleForChannel | jq -r '.bundlePath')
14+
15+
# Deploy the current bundle
16+
./bin/operator-sdk run bundle ${latest_published_bundle} \
17+
--namespace openshift-kmm \
18+
--use-http \
19+
--timeout 5m0s
20+
oc wait --for=condition=Available -n openshift-kmm --timeout=1m deployment/kmm-operator-controller
21+
22+
# Upgrade to the new bundle
23+
./bin/operator-sdk run bundle-upgrade "$OO_BUNDLE" \
24+
--namespace openshift-kmm \
25+
--timeout 5m0s
26+
oc wait --for=condition=Available -n openshift-kmm --timeout=1m deployment/kmm-operator-controller

0 commit comments

Comments
 (0)