From a2dd67771d1ac05bb6d3baed09889b9227891af1 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Mon, 15 Oct 2018 15:20:19 -0400 Subject: [PATCH] feat(build): allow skipping minikube during local builds This only changes behavior if the NO_MINIKUBE variable is set, otherwise minikube calls will be done exactly as before. --- scripts/build_local.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/build_local.sh b/scripts/build_local.sh index 522c54e5b3..a28a27136d 100755 --- a/scripts/build_local.sh +++ b/scripts/build_local.sh @@ -5,9 +5,11 @@ set -e -ps x | grep -q [m]inikube || minikube start --kubernetes-version="v1.12.0" --extra-config=apiserver.v=4 || { echo 'Cannot start minikube.'; exit 1; } -eval $(minikube docker-env) || { echo 'Cannot switch to minikube docker'; exit 1; } -kubectl config use-context minikube +if [ -z "$NO_MINIKUBE" ]; then + ps x | grep -q [m]inikube || minikube start --kubernetes-version="v1.12.0" --extra-config=apiserver.v=4 || { echo 'Cannot start minikube.'; exit 1; } + eval $(minikube docker-env) || { echo 'Cannot switch to minikube docker'; exit 1; } + kubectl config use-context minikube +fi docker build -f e2e.Dockerfile . docker tag $(docker images --filter 'label=stage=olm' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm:local docker tag $(docker images --filter 'label=stage=e2e' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm-e2e:local