Add a media target to push final artefacts to tagged by commit id

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-09-11 19:45:08 +01:00
parent cd6507f1d0
commit 6fdcb8716a
2 changed files with 15 additions and 0 deletions

3
Dockerfile.media Normal file
View File

@ -0,0 +1,3 @@
FROM scratch
ADD alpine/initrd.img alpine/kernel/x86_64/vmlinuz64 alpine/mobylinux-bios.iso alpine/mobylinux-efi.iso /

View File

@ -26,6 +26,18 @@ test: Dockerfile.test alpine/initrd.img alpine/kernel/x86_64/vmlinuz64
tail -f test.log 2>/dev/null | grep -m 1 -q 'Moby test suite '
cat test.log | grep -q 'Moby test suite PASSED'
TAG=$(shell git rev-parse HEAD)
STATUS=$(shell git status -s)
media: Dockerfile.media alpine/initrd.img alpine/kernel/x86_64/vmlinuz64 alpine/mobylinux-bios.iso alpine/mobylinux-efi.iso
ifeq ($(STATUS),)
tar cf - $^ | docker build -f Dockerfile.media -t mobylinux/media:latest -
docker tag mobylinux/media:latest mobylinux/media:$(TAG)
docker push mobylinux/media:$(TAG)
docker push mobylinux/media:latest
else
$(error "git not clean")
endif
.PHONY: clean
clean: