tdiesler commented on code in PR #5253:
URL: https://github.com/apache/camel-k/pull/5253#discussion_r1528244736


##########
script/Makefile:
##########
@@ -456,6 +456,18 @@ images-all:
        make IMAGE_ARCH=arm64 images
        make IMAGE_ARCH=amd64 images
 
+images-push:
+       docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-amd64
+       docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION)
+       @if docker inspect $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64 &> 
/dev/null; then \
+               echo "Image $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64 exists, 
building the multiarch manifest"; \
+               docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64; \
+               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); 
\
+       else \
+               echo "Image $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64 does not 
exist"; \
+       fi
+
 images-push-staging:

Review Comment:
   No, this is intentional.
   
   The general idea is that `make images` (ignore the confusing plural) builds 
the image for your current platform. Hence, there is no guarantee that *-arm64 
will be available.
   
   Only if you do `make images-all` will all the images be available - see the 
GHA for this
   
   `make images-push` should fail when *-amd64 is not available. In this way it 
is guaranteed, that the default version (without arch suffix) always points to: 
either the -amd64 variant or a manifest list that contains the -amd64 variant.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to