diff --git a/Makefile b/Makefile index 509a89ec18e..9342c53375c 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ all: aws/efs ceph/cephfs ceph/rbd flex gluster/block gluster/glusterfs gluster/f clean: clean-aws/efs clean-ceph/cephfs clean-ceph/rbd clean-flex clean-gluster/block clean-gluster/glusterfs clean-iscsi/targetd clean-local-volume/provisioner clean-nfs-client clean-nfs clean-openebs clean-snapshot .PHONY: clean -test: test-aws/efs test-local-volume/provisioner test-local-volume/helm test-nfs test-snapshot +test: test-aws/efs test-local-volume/provisioner test-nfs test-snapshot .PHONY: test verify: diff --git a/local-volume/helm/test/run.sh b/local-volume/helm/test/run.sh index 960961e44de..8a173a81cf0 100755 --- a/local-volume/helm/test/run.sh +++ b/local-volume/helm/test/run.sh @@ -21,16 +21,9 @@ set -o pipefail ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd) cd $ROOT -function install_helm() { - local OS=$(uname | tr A-Z a-z) - local VERSION=v2.7.2 - local ARCH=amd64 - local HELM_URL=http://storage.googleapis.com/kubernetes-helm/helm-${VERSION}-${OS}-${ARCH}.tar.gz - curl -s "$HELM_URL" | sudo tar --strip-components 1 -C /usr/local/bin -zxf - ${OS}-${ARCH}/helm -} - if ! which helm &>/dev/null; then - install_helm + echo "helm not installed, see README.md for instructions on installing it" + exit 2 fi # lint first diff --git a/test.sh b/test.sh index 8c6f5badb61..0ff0e695655 100755 --- a/test.sh +++ b/test.sh @@ -19,6 +19,18 @@ set -o nounset set -o pipefail set -o xtrace +# This file is used by travisci to test PRs. +# It installs several dependencies on the test machine that are +# required to run the tests. + +function install_helm() { + local OS=$(uname | tr A-Z a-z) + local VERSION=v2.7.2 + local ARCH=amd64 + local HELM_URL=http://storage.googleapis.com/kubernetes-helm/helm-${VERSION}-${OS}-${ARCH}.tar.gz + curl -s "$HELM_URL" | sudo tar --strip-components 1 -C /usr/local/bin -zxf - ${OS}-${ARCH}/helm +} + # Skip duplicate build and test runs through the CI, that occur because we are now running on osx and linux. # Skipping these steps saves time and travis-ci resources. if [ "$TRAVIS_OS_NAME" = "osx" ]; then @@ -49,6 +61,8 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH=$(pwd):${PATH} make make test + install_helm + make test-local-volume/helm fi elif [ "$TEST_SUITE" = "linux-nfs" ]; then # Install nfs, cfssl @@ -120,5 +134,6 @@ elif [ "$TEST_SUITE" = "linux-everything-else" ]; then elif [ "$TEST_SUITE" = "linux-local-volume" ]; then make local-volume/provisioner make test-local-volume/provisioner + install_helm make test-local-volume/helm fi