morpheyesh commented on a change in pull request #233:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/233#discussion_r581189537
##########
File path: scripts/run-e2e-tests.sh
##########
@@ -75,18 +75,35 @@ function install_cluster() {
# install kubectl
echo "step 3/6: installing kubectl"
- stable_release=$(curl -s
https://storage.googleapis.com/kubernetes-release/release/stable.txt)
- exit_on_error "unable to retrieve latest stable version of kubectl"
- curl -LO
https://storage.googleapis.com/kubernetes-release/release/${stable_release}/bin/linux/amd64/kubectl
\
- && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- exit_on_error "install kubectl failed"
+
+ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
+ echo "Installing Kubectl for Linux.."
+ stable_release=$(curl -s
https://storage.googleapis.com/kubernetes-release/release/stable.txt)
+ exit_on_error "unable to retrieve latest stable version of kubectl"
+ curl -LO
https://storage.googleapis.com/kubernetes-release/release/${stable_release}/bin/linux/amd64/kubectl
\
+ && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
+ exit_on_error "install kubectl failed"
+ elif [[ "$OSTYPE" == "darwin"* ]]; then
+ echo "Installing Kubectl for Mac.."
+ curl -LO "https://dl.k8s.io/release/$(curl -L -s
https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl" \
+ && chmod +x kubectl && sudo mv kubectl /usr/local/bin
+ fi
Review comment:
Let me know if this looks good.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]