1
2# the base of where these containers will appear
3REGISTRY := registry.gitlab.com/xen-project/xen/tests-artifacts
4CONTAINERS = $(subst .dockerfile,,$(wildcard */*.dockerfile))
5
6help:
7	@echo "Containers to build and export tests artifacts."
8	@echo "To build one run 'make ARTIFACT/VERSION'. Available containers:"
9	@$(foreach file,$(sort $(CONTAINERS)),echo ${file};)
10	@echo "To push container builds, set the env var PUSH"
11
12%: %.dockerfile ## Builds containers
13	$(DOCKER_CMD) build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
14	@if [ ! -z $${PUSH+x} ]; then \
15		$(DOCKER_CMD) push $(REGISTRY)/$(@D):$(@F); \
16	fi
17
18.PHONY: all
19all: $(CONTAINERS)
20