Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Adding TravisCI
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Jan 28, 2019
1 parent d403ab8 commit b988fce
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .travis.yml
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

0 comments on commit b988fce

Please sign in to comment.