This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
sudo: required | ||
|
||
# We need the systemd for the kubeadm and it's default from 16.04+ | ||
dist: xenial | ||
# This moves Kubernetes specific config files. | ||
env: | ||
global: | ||
- CHANGE_MINIKUBE_NONE_USER=true | ||
# curl --silent "https://api.github.com/repos/helm/helm/releases/latest" | sed -n 's/.*"tag_name": "v\([^"]*\)",/\1/p' | ||
- HELM_VERSION="2.12.3" | ||
# curl --silent "https://api.github.com/repos/kubernetes/minikube/releases/latest" | sed -n 's/.*"tag_name": "v\([^"]*\)",/\1/p' | ||
- MINIKUBE_VERSION="0.30.0" | ||
- KUBERNETES_VERSION="1.12.0" | ||
|
||
before_script: | ||
# Make root mounted as rshared to fix kube-dns issues. | ||
- sudo mount --make-rshared / | ||
# Download kubectl, which is a requirement for using minikube. | ||
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ | ||
# Download minikube. | ||
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v${MINIKUBE_VERSION}/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ | ||
- sudo minikube start --vm-driver=none --bootstrapper=kubeadm --kubernetes-version=v${KUBERNETES_VERSION} | ||
# Fix the kubectl context, as it's often stale. | ||
- minikube update-context | ||
# Wait for Kubernetes to be up and ready. | ||
- 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 | ||
|
||
script: | ||
- kubectl cluster-info | ||
- curl -SsL https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz | sudo tar --strip-components 1 -C /usr/local/bin/ -xzf - linux-amd64/helm | ||
- sed -n '/^```bash/,/^```/p' README.md | sed '/^```*/d' | sed -n '/^export KUBECONFIG=/,$p' | sh -x |