airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] r39132 closed pull request #3676: [AIRFLOW-2829] Brush up the CI script for minikube
Date Wed, 01 Aug 2018 21:30:54 GMT
r39132 closed pull request #3676: [AIRFLOW-2829] Brush up the CI script for minikube

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scripts/ci/kubernetes/minikube/ b/scripts/ci/kubernetes/minikube/
index 5171a26313..c9388e08ff 100755
--- a/scripts/ci/kubernetes/minikube/
+++ b/scripts/ci/kubernetes/minikube/
@@ -24,19 +24,19 @@ _MY_SCRIPT="${BASH_SOURCE[0]}"
 _MY_DIR=$(cd "$(dirname "$_MY_SCRIPT")" && pwd)
 # Avoids 1.7.x because of
-echo "setting up kubernetes ${_KUBERNETES_VERSION}"
+echo "setting up kubernetes ${_KUBERNETES_VERSION}, using minikube ${_MINIKUBE_VERSION}"
 _UNAME_OUT=$(uname -s)
 case "${_UNAME_OUT}" in
     Linux*)     _MY_OS=linux;;
     Darwin*)    _MY_OS=darwin;;
-    *)          _MY_OS="UNKNOWN:${unameOut}"
+    *)          echo "${_UNAME_OUT} is unsupported."
+                exit 1;;
 echo "Local OS is ${_MY_OS}"
@@ -58,27 +58,25 @@ if [[ ! -x /usr/local/bin/kubectl ]]; then
   curl -Lo bin/kubectl  \${_KUBERNETES_VERSION}/bin/${_MY_OS}/amd64/kubectl
   chmod +x bin/kubectl
+  sudo mv bin/kubectl /usr/local/bin/kubectl
 if [[ ! -x /usr/local/bin/minikube ]]; then
   echo Downloading minikube.
   curl -Lo bin/minikube  \${_MINIKUBE_VERSION}/minikube-${_MY_OS}-amd64
   chmod +x bin/minikube
+  sudo mv bin/minikube /usr/local/bin/minikube
-sudo mv bin/minikube /usr/local/bin/minikube
-sudo mv bin/kubectl /usr/local/bin/kubectl
 export PATH="${_MY_DIR}/bin:$PATH"
 if [[ "${USE_MINIKUBE_DRIVER_NONE:-}" = "true" ]]; then
   # Run minikube with none driver.
   # See
-  _VM_DRIVER="--vm-driver=none"
+  _VM_DRIVER=none
   if [[ ! -x /usr/local/bin/nsenter ]]; then
     # From
     # Travis ubuntu trusty env doesn't have nsenter, needed for --vm-driver=none
-    which nsenter >/dev/null && return 0
     echo "INFO: Building 'nsenter' ..."
 cat <<-EOF | docker run -i --rm -v "$(pwd):/build" ubuntu:14.04 >&
         apt-get update
@@ -93,7 +91,7 @@ EOF
     if [ ! -f ./nsenter ]; then
         echo "ERROR: nsenter build failed, log:"
-        return 1
+        exit 1
     echo "INFO: nsenter build OK"
     sudo mv ./nsenter /usr/local/bin
@@ -102,10 +100,10 @@ fi
 echo "your path is ${PATH}"
-_MINIKUBE="sudo PATH=$PATH minikube"
+_MINIKUBE="sudo -E PATH=$PATH minikube"
 $_MINIKUBE config set bootstrapper localkube
-$_MINIKUBE start --kubernetes-version=${_KUBERNETES_VERSION}  --vm-driver=none
+$_MINIKUBE start --kubernetes-version=${_KUBERNETES_VERSION} --vm-driver=${_VM_DRIVER}
 $_MINIKUBE update-context
 # Wait for Kubernetes to be up and ready.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message