Files
xen/automation/tests-artifacts/Makefile
T
Andrew Cooper 8a5ef972ba CI: (More) Always pull base image when building a container
Repeat c/s 26ecc08b98 ("automation: Always pull base image when building a
container") for the other makefile we've got building containers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
2023-10-20 11:55:46 +01:00

20 lines
631 B
Makefile

# the base of where these containers will appear
REGISTRY := registry.gitlab.com/xen-project/xen/tests-artifacts
CONTAINERS = $(subst .dockerfile,,$(wildcard */*.dockerfile))
help:
@echo "Containers to build and export tests artifacts."
@echo "To build one run 'make ARTIFACT/VERSION'. Available containers:"
@$(foreach file,$(sort $(CONTAINERS)),echo ${file};)
@echo "To push container builds, set the env var PUSH"
%: %.dockerfile ## Builds containers
docker build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
@if [ ! -z $${PUSH+x} ]; then \
docker push $(REGISTRY)/$(@D):$(@F); \
fi
.PHONY: all
all: $(CONTAINERS)