@@ -6,7 +6,9 @@ SHELL := /usr/bin/env bash
66# To re-generate a bundle for another specific version without changing the standard setup, you can:
77# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
88# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
9- VERSION ?= 0.5.0
9+ VERSION ?= 0.8.0
10+
11+ CONTAINER_ENGINE? =docker
1012
1113# CHANNELS define the bundle channels used in the bundle.
1214# Add a new line here if you would like to change its default config. (E.g CHANNELS = "preview,fast,stable")
@@ -37,7 +39,7 @@ IMGVERSION ?= $(IMG):$(VERSION)
3739BUNDLE_IMG ?= $(IMG ) -bundle:$(VERSION )
3840
3941# The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:0.2.0).
40- CATALOG_IMG ?= $(IMG ) -catalog:latest
42+ CATALOG_IMG ?= $(IMG ) -catalog:$( VERSION )
4143
4244# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
4345ifeq (,$(shell go env GOBIN) )
@@ -151,17 +153,17 @@ bundle: manifests kustomize ## Generate bundle manifests and metadata, update se
151153
152154.PHONY : bundle-build
153155bundle-build : # # Build the bundle image.
154- docker build -f bundle.Dockerfile -t $(BUNDLE_IMG ) .
156+ $( CONTAINER_ENGINE ) build -f bundle.Dockerfile -t $(BUNDLE_IMG ) .
155157
156158.PHONY : bundle-push
157159bundle-push : # # Push the bundle image.
158- docker push $(BUNDLE_IMG )
160+ $( CONTAINER_ENGINE ) push $(BUNDLE_IMG )
159161
160162docker-build : # # Build the docker image
161- docker build -t $(IMGVERSION ) .
163+ $( CONTAINER_ENGINE ) build -t $(IMGVERSION ) .
162164
163165docker-push : # # Push the docker image
164- docker push $(IMGVERSION )
166+ $( CONTAINER_ENGINE ) push $(IMGVERSION )
165167
166168# Additional make goals
167169.PHONY : run-kind
@@ -218,9 +220,9 @@ endif
218220# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
219221.PHONY : catalog-build
220222catalog-build : opm # # Build a catalog image.
221- $(OPM ) index add --container-tool docker --mode semver --tag $(CATALOG_IMG ) --bundles $(BUNDLE_IMGS ) $(FROM_INDEX_OPT )
223+ $(OPM ) index add --container-tool $( CONTAINER_ENGINE ) --mode semver --tag $(CATALOG_IMG ) --bundles $(BUNDLE_IMGS ) $(FROM_INDEX_OPT )
222224
223225# Push the catalog image.
224226.PHONY : catalog-push
225227catalog-push : # # Push a catalog image.
226- docker push $(CATALOG_IMG )
228+ $( CONTAINER_ENGINE ) push $(CATALOG_IMG )
0 commit comments