]> xenbits.xensource.com Git - xen.git/commitdiff
CI: consistently use DOCKER_CMD in makefiles
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Mon, 7 Apr 2025 12:31:06 +0000 (14:31 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 7 Apr 2025 18:17:38 +0000 (19:17 +0100)
This allows rebuilding containers using podman too.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
automation/build/Makefile
automation/tests-artifacts/Makefile

index 4df43b040777100956a48569931b8771b653bec7..fedf7524dacd35a8cc4818bcecc5f08dbe2c8372 100644 (file)
@@ -31,8 +31,8 @@ clean:
 define CLEAN_RULE
 .PHONY: clean-$(1)
 clean-$(1):
-       if [ -n "$$$$(docker image ls -q $(REGISTRY)/$(subst /,:,$(1)))" ]; then \
-               docker image rm $(REGISTRY)/$(subst /,:,$(1)); \
+       if [ -n "$$$$($(DOCKER_CMD) image ls -q $(REGISTRY)/$(subst /,:,$(1)))" ]; then \
+               $(DOCKER_CMD) image rm $(REGISTRY)/$(subst /,:,$(1)); \
        fi
 
 endef
index d055cd696bed231e3322701c2efae0eb1578b2a7..80a60a94f3f7aee3e4c05670c051b35345ae028b 100644 (file)
@@ -10,9 +10,9 @@ help:
        @echo "To push container builds, set the env var PUSH"
 
 %: %.dockerfile ## Builds containers
-       docker build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
+       $(DOCKER_CMD) build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
        @if [ ! -z $${PUSH+x} ]; then \
-               docker push $(REGISTRY)/$(@D):$(@F); \
+               $(DOCKER_CMD) push $(REGISTRY)/$(@D):$(@F); \
        fi
 
 .PHONY: all