Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #849 from ianchakeres/refactor-install-helm
Browse files Browse the repository at this point in the history
Shifted installation of helm, for local-volume/helm/test/run.sh
  • Loading branch information
wongma7 committed Jul 9, 2018
2 parents 43c7070 + 7b00ea0 commit 4530b2f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 2 additions & 9 deletions local-volume/helm/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 4530b2f

Please sign in to comment.