Skip to content

Commit

Permalink
Merge pull request #2795 from ElvinEfendi/fix-dev-env-script
Browse files Browse the repository at this point in the history
start minikube before trying to build the image
  • Loading branch information
k8s-ci-robot authored Jul 17, 2018
2 parents 2486ad9 + c493309 commit bcdfac6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ export REGISTRY=${REGISTRY:-ingress-controller}

DEV_IMAGE=${REGISTRY}/nginx-ingress-controller:${TAG}

echo "[dev-env] building container"
make build container

if [ -z "${SKIP_MINIKUBE_START}" ]; then
test $(minikube status | grep Running | wc -l) -eq 2 && $(minikube status | grep -q 'Correctly Configured') || minikube start \
--extra-config=kubelet.sync-frequency=1s \
--extra-config=apiserver.authorization-mode=RBAC

eval $(minikube docker-env)
fi

echo "[dev-env] building container"
make build container

docker save "${DEV_IMAGE}" | (eval $(minikube docker-env) && docker load) || true

echo "[dev-env] installing kubectl"
Expand Down

0 comments on commit bcdfac6

Please sign in to comment.