Created
April 20, 2018 09:06
-
-
Save ruzickap/3d857b04aab4fa39a93fed86a2864d3e to your computer and use it in GitHub Desktop.
Appveyor file which runs minikube for testing Kubernetes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: ubuntu | |
build_script: | |
# Download ans install minikube | |
# Download kubectl, which is a requirement for using minikube | |
- curl -sL https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o kubectl | |
- chmod +x kubectl | |
- sudo mv kubectl /usr/local/bin/ | |
# Download minikube | |
- curl -sL https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -o minikube | |
- chmod +x minikube | |
- sudo mv minikube /usr/local/bin/ | |
- sudo CHANGE_MINIKUBE_NONE_USER=true minikube start --vm-driver=none --memory=4096 | |
# Wait for Kubernetes to be up and ready (https://blog.travis-ci.com/2017-10-26-running-kubernetes-on-travis-ci-with-minikube) | |
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done | |
# Run commands | |
- kubectl get nodes | |
- kubectl get pods --all-namespaces |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment