This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 1f06bdd40 feat(ci): publish arm64 architecture
1f06bdd40 is described below

commit 1f06bdd400209b28fc7be9b5e94cb2e10f56d575
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Thu May 25 12:20:27 2023 +0200

    feat(ci): publish arm64 architecture
    
    Ref #4148
---
 script/Makefile | 29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/script/Makefile b/script/Makefile
index b48efb190..51c3834d2 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -437,32 +437,23 @@ ifneq (,$(findstring SNAPSHOT,$(RUNTIME_VERSION)))
 endif
        @echo "####### Building Camel K operator container image..."
        mkdir -p build/_maven_output
-       docker build -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile .
-
-images-arch: build kamel-overlay maven-overlay bundle-kamelets
-ifneq (,$(findstring SNAPSHOT,$(RUNTIME_VERSION)))
-       ./script/package_maven_artifacts.sh -s "$(STAGING_RUNTIME_REPO)" -d 
"$(CAMEL_K_RUNTIME_DIR)" $(RUNTIME_VERSION)
-endif
-       @echo "####### Building Camel K operator container image for multi 
architectures..."
-       mkdir -p build/_maven_output
-       docker buildx rm --all-inactive --force
-       docker buildx create --append --name builder
-ifeq ($(shell uname -m), x86_x64)
-       docker buildx build --platform=linux/amd64 -t 
$(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
-endif
-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/amd64 -t 
$(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
-endif
+       docker build --platform=linux/amd64 -t 
$(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile .
+       docker build --platform=linux/arm64 -t 
$(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64 -f build/Dockerfile .
 
 images-push:
        docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION)
+       docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64
 
 images-push-staging:
        docker tag $(CUSTOM_IMAGE):$(CUSTOM_VERSION) 
$(STAGING_IMAGE_NAME):$(CUSTOM_VERSION)
+       docker tag $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64 
$(STAGING_IMAGE_NAME):$(CUSTOM_VERSION)-arm64
        docker push $(STAGING_IMAGE_NAME):$(CUSTOM_VERSION)
+       docker push $(STAGING_IMAGE_NAME):$(CUSTOM_VERSION)-arm64
+       # TODO: we can evaluate the usage of manifest and try the following
+       # docker manifest create $(CUSTOM_IMAGE):$(CUSTOM_VERSION) \
+       # --amend $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-amd64 \
+       # --amend $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64
+       # docker manifest push --purge $(CUSTOM_IMAGE):$(CUSTOM_VERSION)
 
 get-image:
        @echo $(CUSTOM_IMAGE)

Reply via email to