From 0856e13ee60ed614119f829dd359c9fef4baa944 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Sun, 24 Feb 2019 02:35:36 +0200 Subject: [PATCH] Use kind kubeconfig --- .circleci/config.yml | 2 +- test/e2e-prerequisites.sh | 4 ++++ test/{e2e-kind.sh => e2e-tests.sh} | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) rename test/{e2e-kind.sh => e2e-tests.sh} (97%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 459c16ea..bd90165d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: steps: - checkout - run: test/e2e-prerequisites.sh - - run: test/e2e-kind.sh + - run: test/e2e-tests.sh workflows: version: 2 diff --git a/test/e2e-prerequisites.sh b/test/e2e-prerequisites.sh index fa30860d..6e7996f9 100755 --- a/test/e2e-prerequisites.sh +++ b/test/e2e-prerequisites.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -o errexit + REPO_ROOT=$(git rev-parse --show-toplevel) echo ">>> Installing kubectl" @@ -18,6 +20,8 @@ chmod +x kind sudo mv kind /usr/local/bin/ kind create cluster --wait 5m +export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" + echo ">>> Installing helm" curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash diff --git a/test/e2e-kind.sh b/test/e2e-tests.sh similarity index 97% rename from test/e2e-kind.sh rename to test/e2e-tests.sh index eac7ff83..2881b7fc 100755 --- a/test/e2e-kind.sh +++ b/test/e2e-tests.sh @@ -4,11 +4,9 @@ set -o errexit ISTIO_VER="1.1.0-rc.0" REPO_ROOT=$(git rev-parse --show-toplevel) +export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" echo ">>> Starting e2e testing using Istio ${ISTIO_VER}" -export KUBECONFIG="$(kind get kubeconfig-path)" -kubectl version - helm repo add istio.io https://storage.googleapis.com/istio-release/releases/${ISTIO_VER}/charts echo '>>> Installing Istio CRDs' @@ -23,8 +21,10 @@ helm upgrade -i istio istio.io/istio --wait --namespace istio-system -f ${REPO_R export KUBECONFIG="$(kind get kubeconfig-path)" -echo '>>> Installing Flagger' +echo '>>> Building Flagger' cd ${REPO_ROOT} && docker build -t test/flagger:latest . -f Dockerfile + +echo '>>> Installing Flagger' kind load docker-image test/flagger:latest kubectl apply -f ${REPO_ROOT}/artifacts/flagger/ kubectl -n istio-system set image deployment/flagger flagger=test/flagger:latest