Commit a48d9573 authored by Adam Reese's avatar Adam Reese

fix(e2e): clean up duplicate code

parent 0b1549f2
...@@ -18,26 +18,12 @@ set -eo pipefail ...@@ -18,26 +18,12 @@ set -eo pipefail
HELM_ROOT="${BASH_SOURCE[0]%/*}/.." HELM_ROOT="${BASH_SOURCE[0]%/*}/.."
source "${HELM_ROOT}/scripts/common.sh" source "${HELM_ROOT}/scripts/common.sh"
source "${HELM_ROOT}/scripts/docker.sh"
if [ -f "${HELM_ROOT}/scripts/env.sh" ]; then
source "${HELM_ROOT}/scripts/env.sh"
fi
K8S_VERSION=${K8S_VERSION:-1.2.0} K8S_VERSION=${K8S_VERSION:-1.2.0}
KUBE_PORT=${KUBE_PORT:-8080} KUBE_PORT=${KUBE_PORT:-8080}
KUBE_CONFIG="${HELM_ROOT}/scripts/kubeconfig"
KUBE_HOST=${KUBE_HOST:-localhost} KUBE_HOST=${KUBE_HOST:-localhost}
is_docker_machine() {
[[ $(docker-machine active 2>/dev/null) ]]
}
active_docker_machine() {
if command -v docker-machine >/dev/null 2>&1; then
docker-machine active
fi
}
if is_docker_machine; then if is_docker_machine; then
KUBE_HOST=$(docker-machine ip "$(active_docker_machine)") KUBE_HOST=$(docker-machine ip "$(active_docker_machine)")
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment