From 4dda1740e9743b244b9c45f59961c836e7b147ba Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Fri, 16 Jun 2017 15:35:49 -0700 Subject: [PATCH] Add ways to test other channels Signed-off-by: Eli Uriegas --- .gitignore | 1 + Makefile | 9 +++++++-- verify-docker-install | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 397b4a7..749504c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.log +build/ diff --git a/Makefile b/Makefile index 785e8d5..392cc5e 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,34 @@ SHELL:=/bin/bash VERIFY_INSTALL_DISTROS:=$(addprefix verify-install-,centos-7 fedora-24 fedora-25 debian-wheezy debian-jessie debian-stretch ubuntu-trusty ubuntu-xenial ubuntu-yakkety ubuntu-zesty) +CHANNEL_TO_TEST:=test EXPECTED_VERSION?= EXPECTED_GITCOMMIT?= +.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: check check: $(VERIFY_INSTALL_DISTROS) +.PHONY: clean clean: $(RM) *.log verify-install-%.log: 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 -,:,$*) \ bash verify-docker-install "$(EXPECTED_VERSION)" "$(EXPECTED_GITCOMMIT)" | tee $@ - -# TODO: Add a target for uploading final script to s3 diff --git a/verify-docker-install b/verify-docker-install index 41f9ae6..bf73ff7 100644 --- a/verify-docker-install +++ b/verify-docker-install @@ -3,7 +3,7 @@ expected_version=$1 expected_gitcommit=$2 ( echo "Executing installation script!" - sh install.sh + sh build/install.sh ) docker_version=$(docker --version) if [ $? -ne 0 ]; then