From b8e5567e9101e0f2077617c8ca40dc4cfade55a3 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Mon, 13 May 2019 12:57:25 +0200 Subject: [PATCH] install Kind to GOENV/bin --- Makefile | 4 ++-- e2e/run.sh | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9f487d3b8..0ff427182 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ ifdef CDP_PULL_REQUEST_NUMBER CDP_TAG := -${CDP_BUILD_VERSION} endif - +KIND_PATH := $(GOPATH)/bin PATH := $(GOPATH)/bin:$(PATH) SHELL := env PATH=$(PATH) $(SHELL) @@ -98,7 +98,7 @@ e2e-build: e2e-tools: wget https://github.com/kubernetes-sigs/kind/releases/download/0.2.1/kind-linux-amd64 chmod +x kind-linux-amd64 - mv kind-linux-amd64 /tmp/kind + mv kind-linux-amd64 $(KIND_PATH) e2e-run: docker e2e/run.sh diff --git a/e2e/run.sh b/e2e/run.sh index 7d3902cb1..48c7697bf 100755 --- a/e2e/run.sh +++ b/e2e/run.sh @@ -6,16 +6,13 @@ set -o nounset set -o pipefail IFS=$'\n\t' -export PATH=$PATH:/tmp/kind -echo $PATH -ls -al /tmp/kind - readonly cluster_name="postgres-operator-e2e-tests" readonly operator_image=$(docker images --filter=reference="registry.opensource.zalan.do/acid/postgres-operator" --format "{{.Repository}}:{{.Tag}}" | head -1) readonly e2e_test_image=${cluster_name} readonly kind_api_server_port=6443 # well-known in the 'kind' codebase readonly kubeconfig_path="./e2e/kind-config-${cluster_name}" +alias kind="${GOPATH}/bin/kind-linux-amd64" # avoid interference with previous test runs if [[ $(kind get clusters | grep "^${cluster_name}*") != "" ]] then @@ -36,4 +33,5 @@ sed -i "s/server.*$/server: https:\/\/$kind_api_server/g" ${kubeconfig_path} docker run --rm --mount type=bind,source="$(realpath ${kubeconfig_path})",target=/root/.kube/config -e OPERATOR_IMAGE=${operator_image} ${e2e_test_image} kind delete cluster --name ${cluster_name} +unalias kind rm -rf ${kubeconfig_path}