Files
xen/automation/tests-artifacts/Makefile
T
Stefano Stabellini e1681ce44c automation: add tests artifacts
Some tests (soon to come) will require pre-built binaries to run, such
as the Linux kernel binary. We don't want to rebuild the Linux kernel
for each gitlab-ci run: these builds should not be added to the current
list of build jobs.

Instead, create additional containers that today are built and uploaded
manually, but could be re-built automatically. The containers build the
required binarires during the "docker build" step and store them inside
the container itself.

gitlab-ci will be able to fetch these pre-built binaries during the
regular test runs, saving cycles.

Add two tests artifacts containers:
- one to build the Linux kernel ARM64
- one to create an Alpine Linux ARM64 rootfs for Dom0

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
2020-12-17 14:56:43 -08:00

20 lines
624 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 -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
@if [ ! -z $${PUSH+x} ]; then \
docker push $(REGISTRY)/$(@D):$(@F); \
fi
.PHONY: all
all: $(CONTAINERS)