Skip to content

Commit a5b061d

Browse files
authored
STOR-2600, OCPBUGS-61442: Bump OLM metadata to 4.21 (#87)
* Add update-metadata.sh for updating Metadata, Makefile and README * STOR-2600: Bump OLM metadata to 4.21 * add make update to Makefile * update README with how to use update-metadata.sh * fix update-metadata.sh script to work on Fedora as well * update-metadata.sh script updated based on review
1 parent cbafac2 commit a5b061d

File tree

5 files changed

+471
-344
lines changed

5 files changed

+471
-344
lines changed

Makefile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
CURPATH=$(PWD)
2+
BIN_PATH=$(CURPATH)/bin
3+
YQ = $(BIN_PATH)/yq
4+
YQ_VERSION = v4.47.1
5+
export PATH := $(BIN_PATH):$(PATH)
6+
17
all: build
28
.PHONY: all
39

@@ -6,8 +12,22 @@ include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
612
golang.mk \
713
targets/openshift/deps-gomod.mk \
814
targets/openshift/images.mk \
15+
targets/openshift/yq.mk \
916
)
1017

18+
# Bump OCP version in CSV and OLM metadata
19+
# Also updates the Makefile and README.md to the new version
20+
#
21+
# Example:
22+
# make metadata VERSION=4.20.0
23+
metadata: ensure-yq
24+
ifdef VERSION
25+
./hack/update-metadata.sh $(VERSION)
26+
else
27+
./hack/update-metadata.sh
28+
endif
29+
.PHONY: metadata
30+
1131
# Check if GOEXPERIMENT=strictfipsruntime is supported
1232
GOEXPERIMENT_SUPPORTED := $(shell GOEXPERIMENT=strictfipsruntime go version >/dev/null 2>&1 && echo "true" || echo "false")
1333

@@ -38,9 +58,9 @@ IMAGE_REGISTRY?=registry.svc.ci.openshift.org
3858
# $3 - Dockerfile path
3959
# $4 - context directory for image build
4060
# It will generate target "image-$(1)" for building the image and binding it as a prerequisite to target "images".
41-
$(call build-image,secrets-store-csi-driver-operator,$(IMAGE_REGISTRY)/ocp/4.20:secrets-store-csi-driver-operator,./Dockerfile.openshift,.)
61+
$(call build-image,secrets-store-csi-driver-operator,$(IMAGE_REGISTRY)/ocp/4.21:secrets-store-csi-driver-operator,./Dockerfile.openshift,.)
4262

43-
clean:
63+
clean: clean-yq
4464
$(RM) secrets-store-csi-driver-operator
4565
.PHONY: clean
4666

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,20 @@ export LIVENESS_PROBE_IMAGE=quay.io/openshift/origin-csi-livenessprobe:latest
3232
./secrets-store-csi-driver-operator start --kubeconfig $KUBECONFIG --namespace openshift-cluster-csi-drivers
3333
```
3434

35+
## Bumping OCP version in CSV and OLM metadata
36+
37+
This updates the package versions in `config/manifests/secrets-store-csi-driver-operator.package.yaml`, `config/manifests/stable/secrets-store-csi-driver-operator.clusterserviceversion.yaml`, `README.md` and `Makefile` to 4.20:
38+
```
39+
./hack/update-metadata.sh 4.20
40+
```
41+
3542
# OLM
3643

3744
To build bundle and index images, use the `hack/create-bundle` script:
3845

3946
```shell
4047
cd hack
41-
./create-bundle registry.ci.openshift.org/ocp/4.20:secrets-store-csi-driver registry.ci.openshift.org/ocp/4.20:secrets-store-csi-driver-operator quay.io/<my_user>/secrets-store-bundle quay.io/<my_user>/secrets-store-index
48+
./create-bundle registry.ci.openshift.org/ocp/4.21:secrets-store-csi-driver registry.ci.openshift.org/ocp/4.21:secrets-store-csi-driver-operator quay.io/<my_user>/secrets-store-bundle quay.io/<my_user>/secrets-store-index
4249
```
4350

4451
At the end it will print a command that creates `Subscription` for the newly created index image.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
packageName: secrets-store-csi-driver-operator
22
channels:
3-
- name: stable
4-
currentCSV: secrets-store-csi-driver-operator.v4.20.0
3+
- name: stable
4+
currentCSV: secrets-store-csi-driver-operator.v4.21.0

0 commit comments

Comments
 (0)