This is an automated email from the ASF dual-hosted git repository.
ricardozanini pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-serverless-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 5eb743c0 [issue 471] Enhance Makefile to allow catalog source image on
MacBook M2 (#472)
5eb743c0 is described below
commit 5eb743c0e2dc711835a461db926029cd440dca50
Author: Jianrong Zhang <[email protected]>
AuthorDate: Wed May 29 11:57:35 2024 -0400
[issue 471] Enhance Makefile to allow catalog source image on MacBook M2
(#472)
---
.gitignore | 1 +
Makefile | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index b72576ce..d5612226 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,4 +28,5 @@ Dockerfile
/.vscode/
/target/
+database/index.db
e2e-test-report.xml
diff --git a/Makefile b/Makefile
index ce87602d..d8349ffd 100644
--- a/Makefile
+++ b/Makefile
@@ -174,7 +174,7 @@ docker-buildx: generate ## Build and push docker image for
the manager for cross
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e '
1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- docker buildx create --name project-v3-builder
docker buildx use project-v3-builder
- - docker buildx build --build-arg SOURCE_DATE_EPOCH=$(shell git log -1
--pretty=%ct) --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross
+ - docker buildx build --build-arg SOURCE_DATE_EPOCH=$(shell git log -1
--pretty=%ct) --push . --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross
- docker buildx rm project-v3-builder
rm Dockerfile.cross
@@ -297,12 +297,16 @@ ifneq ($(origin CATALOG_BASE_IMG), undefined)
FROM_INDEX_OPT := --from-index $(CATALOG_BASE_IMG)
endif
+PLATFORM ?= linux/amd64
+
# Build a catalog image by adding bundle images to an empty catalog using the
operator package manager tool, 'opm'.
# This recipe invokes 'opm' in 'semver' bundle add mode. For more information
on add modes, see:
#
https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
.PHONY: catalog-build
catalog-build: opm ## Build a catalog image.
- $(OPM) index add --container-tool $(BUILDER) --mode semver --tag
$(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
+ $(OPM) index add --container-tool $(BUILDER) --mode semver --tag
$(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) --generate -d
./index.Dockerfile
+ $(BUILDER) build --platform $(PLATFORM) -f ./index.Dockerfile -t
$(CATALOG_IMG) .
+ rm ./index.Dockerfile
# Push the catalog image.
.PHONY: catalog-push
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]