Skip to content

Commit 691cdd5

Browse files
authored
Merge pull request #516 from jpeeler/no-minikube
feat(build): allow skipping minikube during local builds
2 parents 17359ee + a2dd677 commit 691cdd5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/build_local.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55

66
set -e
77

8-
ps x | grep -q [m]inikube || minikube start --kubernetes-version="v1.12.0" --extra-config=apiserver.v=4 || { echo 'Cannot start minikube.'; exit 1; }
9-
eval $(minikube docker-env) || { echo 'Cannot switch to minikube docker'; exit 1; }
10-
kubectl config use-context minikube
8+
if [ -z "$NO_MINIKUBE" ]; then
9+
ps x | grep -q [m]inikube || minikube start --kubernetes-version="v1.12.0" --extra-config=apiserver.v=4 || { echo 'Cannot start minikube.'; exit 1; }
10+
eval $(minikube docker-env) || { echo 'Cannot switch to minikube docker'; exit 1; }
11+
kubectl config use-context minikube
12+
fi
1113
docker build -f e2e.Dockerfile .
1214
docker tag $(docker images --filter 'label=stage=olm' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm:local
1315
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

0 commit comments

Comments
 (0)