mirror of
https://github.com/docker/docker-install.git
synced 2026-11-20 10:03:11 +03:00
.log files didn't work correctly when evaluating possible docker images to run so I removed the suffix portion. Also made it easier to run for specific distros ala: `make DISTROS="fedora-25 fedora-24 centos-7" CHANNEL_TO_TEST=edge EXPECTED_VERSION="17.06.0-ce" EXPECTED_GITCOMMIT="02c1d87" clean check` Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
41 lines
1.0 KiB
Makefile
41 lines
1.0 KiB
Makefile
SHELL:=/bin/bash
|
|
DISTROS:=centos-7 fedora-24 fedora-25 debian-wheezy debian-jessie debian-stretch ubuntu-trusty ubuntu-xenial ubuntu-yakkety ubuntu-zesty
|
|
VERIFY_INSTALL_DISTROS:=$(addprefix verify-install-,$(DISTROS))
|
|
CHANNEL_TO_TEST?=test
|
|
EXPECTED_VERSION?=
|
|
EXPECTED_GITCOMMIT?=
|
|
SHELLCHECK=shellcheck
|
|
|
|
.PHONY: needs_version
|
|
needs_version:
|
|
ifndef EXPECTED_VERSION
|
|
$(error EXPECTED_VERSION is undefined)
|
|
endif
|
|
|
|
.PHONY: needs_gitcommit
|
|
needs_gitcommit:
|
|
ifndef EXPECTED_GITCOMMIT
|
|
$(error EXPECTED_GITCOMMIT is undefined)
|
|
endif
|
|
|
|
.PHONY: shellcheck
|
|
shellcheck:
|
|
$(SHELLCHECK) install.sh
|
|
|
|
.PHONY: check
|
|
check: $(VERIFY_INSTALL_DISTROS)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) verify-install-*
|
|
|
|
verify-install-%: needs_version needs_gitcommit
|
|
mkdir -p build
|
|
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
|
|
set -o pipefail && docker run \
|
|
--rm \
|
|
-v $(CURDIR):/v \
|
|
-w /v \
|
|
$(subst -,:,$*) \
|
|
/v/verify-docker-install "$(EXPECTED_VERSION)" "$(EXPECTED_GITCOMMIT)" | tee $@
|