Skip to content

Commit 0f2228f

Browse files
Merge pull request #286 from jhrozek/migrate_catalog
make: Build a file-based catalog
2 parents 50c03e3 + 9dc954c commit 0f2228f

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic
66
Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased] - Date TBD
9+
10+
### Changes
11+
- the upstream catalog image is now built using the
12+
[file format](https://olm.operatorframework.io/docs/reference/file-based-catalogs/)
13+
replacing the now deprecated SQLite format.
14+
15+
### Fixes
16+
17+
### Internal Changes
18+
819
## [0.1.30] - 2022-07-25
920

1021
### Fixes

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ endif
267267
update-skip-range: check-operator-version
268268
sed -i '/replaces:/d' config/manifests/bases/file-integrity-operator.clusterserviceversion.yaml
269269
sed -i "s/\(olm.skipRange: '>=.*\)<.*'/\1<$(VERSION)'/" config/manifests/bases/file-integrity-operator.clusterserviceversion.yaml
270+
sed -i "s/\(\"name\": \"file-integrity-operator.v\).*\"/\1$(VERSION)\"/" catalog/preamble.json
271+
sed -i "s/\(\"skipRange\": \">=.*\)<.*\"/\1<$(VERSION)\"/" catalog/preamble.json
270272

271273
.PHONY: namespace
272274
namespace:
@@ -316,7 +318,13 @@ bundle-image: bundle ## Build the bundle image.
316318
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
317319
.PHONY: catalog-image
318320
catalog-image: opm ## Build a catalog image.
319-
$(OPM) index add --container-tool $(RUNTIME) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
321+
$(eval TMP_DIR := $(shell mktemp -d))
322+
$(eval CATALOG_DOCKERFILE := $(TMP_DIR).Dockerfile)
323+
cp catalog/preamble.json $(TMP_DIR)/file-integrity-operator-catalog.json
324+
$(OPM) render $(BUNDLE_IMGS) >> $(TMP_DIR)/file-integrity-operator-catalog.json
325+
$(OPM) generate dockerfile $(TMP_DIR)
326+
$(RUNTIME) build -f $(CATALOG_DOCKERFILE) -t $(CATALOG_IMG)
327+
rm -rf $(TMP_DIR) $(CATALOG_DOCKERFILE)
320328

321329
.PHONY: catalog
322330
catalog: catalog-image catalog-push ## Build and push a catalog image.

0 commit comments

Comments
 (0)