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

Commit 4530b2f

Browse files
authored
Merge pull request #849 from ianchakeres/refactor-install-helm
Shifted installation of helm, for local-volume/helm/test/run.sh
2 parents 43c7070 + 7b00ea0 commit 4530b2f

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ all: aws/efs ceph/cephfs ceph/rbd flex gluster/block gluster/glusterfs gluster/f
1818
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
1919
.PHONY: clean
2020

21-
test: test-aws/efs test-local-volume/provisioner test-local-volume/helm test-nfs test-snapshot
21+
test: test-aws/efs test-local-volume/provisioner test-nfs test-snapshot
2222
.PHONY: test
2323

2424
verify:

local-volume/helm/test/run.sh

+2-9
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,9 @@ set -o pipefail
2121
ROOT=$(unset CDPATH && cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd)
2222
cd $ROOT
2323

24-
function install_helm() {
25-
local OS=$(uname | tr A-Z a-z)
26-
local VERSION=v2.7.2
27-
local ARCH=amd64
28-
local HELM_URL=http://storage.googleapis.com/kubernetes-helm/helm-${VERSION}-${OS}-${ARCH}.tar.gz
29-
curl -s "$HELM_URL" | sudo tar --strip-components 1 -C /usr/local/bin -zxf - ${OS}-${ARCH}/helm
30-
}
31-
3224
if ! which helm &>/dev/null; then
33-
install_helm
25+
echo "helm not installed, see README.md for instructions on installing it"
26+
exit 2
3427
fi
3528

3629
# lint first

test.sh

+15
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ set -o nounset
1919
set -o pipefail
2020
set -o xtrace
2121

22+
# This file is used by travisci to test PRs.
23+
# It installs several dependencies on the test machine that are
24+
# required to run the tests.
25+
26+
function install_helm() {
27+
local OS=$(uname | tr A-Z a-z)
28+
local VERSION=v2.7.2
29+
local ARCH=amd64
30+
local HELM_URL=http://storage.googleapis.com/kubernetes-helm/helm-${VERSION}-${OS}-${ARCH}.tar.gz
31+
curl -s "$HELM_URL" | sudo tar --strip-components 1 -C /usr/local/bin -zxf - ${OS}-${ARCH}/helm
32+
}
33+
2234
# Skip duplicate build and test runs through the CI, that occur because we are now running on osx and linux.
2335
# Skipping these steps saves time and travis-ci resources.
2436
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
@@ -49,6 +61,8 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
4961
export PATH=$(pwd):${PATH}
5062
make
5163
make test
64+
install_helm
65+
make test-local-volume/helm
5266
fi
5367
elif [ "$TEST_SUITE" = "linux-nfs" ]; then
5468
# Install nfs, cfssl
@@ -120,5 +134,6 @@ elif [ "$TEST_SUITE" = "linux-everything-else" ]; then
120134
elif [ "$TEST_SUITE" = "linux-local-volume" ]; then
121135
make local-volume/provisioner
122136
make test-local-volume/provisioner
137+
install_helm
123138
make test-local-volume/helm
124139
fi

0 commit comments

Comments
 (0)