You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/08/01 14:45:20 UTC
[camel-k] 02/02: Pack the correct binary for the architecture into the operator container
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit eb8973c3ac51afbbdf434f89e20d1043c906f475
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jul 29 13:59:59 2022 +0200
Pack the correct binary for the architecture into the operator container
---
script/Makefile | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/script/Makefile b/script/Makefile
index 14936d5a4..2efae5375 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -28,7 +28,7 @@ KUSTOMIZE_VERSION := v4.1.2
OPM_VERSION := v1.21.0
BASE_IMAGE := docker.io/adoptopenjdk/openjdk11:slim
LOCAL_REPOSITORY := /tmp/artifacts/m2
-IMAGE_NAME := docker.io/apache/camel-k
+IMAGE_NAME ?= docker.io/apache/camel-k
#
# Situations when user wants to override
@@ -298,6 +298,9 @@ ifeq ($(shell uname -s 2>/dev/null || echo Unknown),Linux)
else
go build $(GOFLAGS) -o kamel ./cmd/kamel/*.go
endif
+ifeq ($(shell uname -m), arm64)
+ GOOS=linux GOARCH=arm64 go build $(GOFLAGS) -o kamel.linux.arm ./cmd/kamel/*.go
+endif
build-resources:
./script/get_catalog.sh $(RUNTIME_VERSION) $(STAGING_RUNTIME_REPO)
@@ -398,7 +401,7 @@ ifeq ($(shell uname -m), aarch64)
docker buildx build --platform=linux/arm64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
endif
ifeq ($(shell uname -m), arm64)
- docker buildx build --platform=linux/arm64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
+ docker buildx build --platform=linux/amd64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
endif
images-dev: build kamel-overlay maven-overlay bundle-kamelets package-artifacts
@@ -416,7 +419,8 @@ ifeq ($(shell uname -m), aarch64)
docker buildx build --platform=linux/arm64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
endif
ifeq ($(shell uname -m), arm64)
- docker buildx build --platform=linux/arm64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
+ mv kamel.linux.arm build/_output/bin/kamel
+ docker buildx build --platform=linux/amd64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
endif
images-push: