Skip to content

Commit c75ec38

Browse files
committed
Add github workflow to create upgrades OLM catalog
The upgrades OLM catalog/index has 2 releases in it to facilitate testing operator updates from the last feature release to main. Jira: OSPRH-14819
1 parent 3e40e32 commit c75ec38

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

hack/catalog-build-olm-upgrade.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
MAIN_VERSION=${MAIN_VERSION:-"0.3.0"}
5+
FEATURE_RELEASE_VERSION=${FEATURE_RELEASE_VERSION:-"0.2.0"}
6+
FEATURE_RELEASE_BRANCH=${FEATURE_RELEASE_BRANCH:-"18.0-fr2"}
7+
8+
#rm -Rf catalog
9+
#rm catalog.Dockerfile
10+
11+
cat >> tmp/catalog-description.md << EOF_CAT
12+
# openstack-operator
13+
14+
This is the primary operator for OpenStack. It is a "meta" operator, meaning it
15+
serves to coordinate the other operators for OpenStack by watching and configuring
16+
their CustomResources (CRs). Additionally installing this operator will automatically
17+
install all required operator dependencies for installing/managing OpenStack.
18+
EOF_CAT
19+
20+
21+
mkdir catalog
22+
opm generate dockerfile ./catalog -i registry.redhat.io/openshift4/ose-operator-registry-rhel9:v4.18
23+
opm init openstack-operator --default-channel=stable-v1.0 --description=tmp/catalog-description.md --output yaml > catalog/index.yaml
24+
25+
opm render quay.io/openstack-k8s-operators/openstack-operator-bundle:latest --output yaml >> catalog/index.yaml
26+
opm render quay.io/openstack-k8s-operators/openstack-operator-bundle:${FEATURE_RELEASE_BRANCH}-latest --output yaml >> catalog/index.yaml
27+
28+
cat >> catalog/index.yaml << EOF_CAT
29+
---
30+
schema: olm.channel
31+
package: openstack-operator
32+
name: stable-v1.0
33+
entries:
34+
- name: openstack-operator.v${FEATURE_RELEASE_VERSION}
35+
- name: openstack-operator.v${MAIN_VERSION}
36+
replaces: openstack-operator.v${FEATURE_RELEASE_VERSION}
37+
EOF_CAT
38+
opm validate catalog

0 commit comments

Comments
 (0)