Skip to content

Commit c5cc58c

Browse files
authored
ci: create catalog index dir (#853)
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
1 parent 711ec0d commit c5cc58c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ OPERATOR_BUNDLE=observability-operator.v$(VERSION)
1313
CONTAINER_RUNTIME := $(shell command -v podman 2> /dev/null || echo docker)
1414
OSD_E2E_TEST_HARNESS_IMG=$(IMG_BASE)-test-harness:$(VERSION)
1515
OSD_E2E_TEST_HARNESS_IMG_LATEST=$(IMG_BASE)-test-harness:latest
16+
CATALOG_TEMP ?= $(shell mktemp)
1617

1718
# running `make` builds the operator (default target)
1819
.DEFAULT_GOAL := operator
@@ -205,12 +206,14 @@ CATALOG_IMG_LATEST ?= $(IMG_BASE)-catalog:latest
205206
# operator package manager tool, 'opm'.
206207
.PHONY: catalog-image
207208
catalog-image: $(OPM)
209+
mkdir $(CATALOG_TEMP)/observability-operator-index
210+
cp olm/observability-operator-index.Dockerfile $(CATALOG_TEMP)
208211
./olm/update-channels.sh $(CHANNELS) $(OPERATOR_BUNDLE) $(BUNDLE_IMG)
209-
$(OPM) alpha render-template basic --output yaml --migrate-level bundle-object-to-csv-metadata olm/index-template.yaml > olm/observability-operator-index/index.yaml
210-
$(OPM) validate ./olm/observability-operator-index
212+
$(OPM) alpha render-template basic --output yaml --migrate-level bundle-object-to-csv-metadata olm/index-template.yaml > $(CATALOG_TEMP)/observability-operator-index/index.yaml
213+
$(OPM) validate $(CATALOG_TEMP)/observability-operator-index
211214

212215
$(CONTAINER_RUNTIME) build \
213-
-f olm/observability-operator-index.Dockerfile \
216+
-f $(CATALOG_TEMP)/observability-operator-index.Dockerfile \
214217
-t $(CATALOG_IMG)
215218

216219
# tag the catalog img:version as latest so that continious release

0 commit comments

Comments
 (0)