mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-04 07:48:06 +00:00
This means that multiple builds will not conflict, so we can remove the lock from the CI. Also quieter when no errors. Some still left to do, only done the ones used in build and CI initially. Some of the others will be cleaned up anyway later. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
50 lines
1.5 KiB
Makefile
50 lines
1.5 KiB
Makefile
DOCKER_EXPERIMENTAL?=1
|
|
|
|
all:
|
|
$(MAKE) -C alpine
|
|
|
|
alpine/initrd.img:
|
|
$(MAKE) -C alpine initrd.img
|
|
|
|
alpine/kernel/x86_64/vmlinuz64:
|
|
$(MAKE) -C alpine/kernel x86_64/vmlinuz64
|
|
|
|
alpine/mobylinux-bios.iso:
|
|
$(MAKE) -C alpine mobylinux-bios.iso
|
|
|
|
qemu: Dockerfile.qemu alpine/initrd.img alpine/kernel/x86_64/vmlinuz64
|
|
tar cf - $^ | docker build -f Dockerfile.qemu -t mobyqemu:build -
|
|
docker run -it --rm mobyqemu:build
|
|
|
|
qemu-iso: Dockerfile.qemuiso alpine/mobylinux-bios.iso
|
|
tar cf - $^ | docker build -f Dockerfile.qemuiso -t mobyqemuiso:build -
|
|
docker run -it --rm mobyqemuiso:build
|
|
|
|
test: Dockerfile.test alpine/initrd.img alpine/kernel/x86_64/vmlinuz64
|
|
$(MAKE) -C alpine
|
|
BUILD=$$( tar cf - $^ | docker build -f Dockerfile.test -q - ) && [ -n "$$BUILD" ] && \
|
|
touch test.log && \
|
|
docker run --rm $$BUILD 2>&1 | tee -a test.log && \
|
|
docker rmi --no-prune $$BUILD
|
|
@cat test.log | grep -q 'Moby test suite PASSED'
|
|
|
|
TAG=$(shell git rev-parse HEAD)
|
|
STATUS=$(shell git status -s)
|
|
ifeq ($(DOCKER_EXPERIMENTAL),1)
|
|
MEDIA_PREFIX?=experimental-
|
|
endif
|
|
media: Dockerfile.media alpine/initrd.img alpine/kernel/x86_64/vmlinuz64 alpine/mobylinux-bios.iso alpine/mobylinux-efi.iso
|
|
ifeq ($(STATUS),)
|
|
tar cf - $^ alpine/mobylinux.efi | docker build -f Dockerfile.media -t mobylinux/media:$(MEDIA_PREFIX)latest -
|
|
docker tag mobylinux/media:$(MEDIA_PREFIX)latest mobylinux/media:$(MEDIA_PREFIX)$(TAG)
|
|
docker push mobylinux/media:$(MEDIA_PREFIX)$(TAG)
|
|
docker push mobylinux/media:$(MEDIA_PREFIX)latest
|
|
else
|
|
$(error "git not clean")
|
|
endif
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
$(MAKE) -C alpine clean
|