forked from groundnuty/k8s-wait-for
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
54 lines (48 loc) · 3.7 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
sudo: required
services:
- docker
# We need the systemd for the kubeadm and it's default from 16.04+
dist: xenial
env:
global:
- CHANGE_MINIKUBE_NONE_USER=true
- MINIKUBE_WANTUPDATENOTIFICATION=false
- MINIKUBE_WANTREPORTERRORPROMPT=false
- MINIKUBE_HOME=$HOME
- CHANGE_MINIKUBE_NONE_USER=true
- KUBECONFIG=$HOME/.kube/config
- secure: "P5VlYMgfNy0ukdU1S6l4jBZBNZSqMALpV1a+GiS9AhRhlejn093hQ/8oFbH/Lf1WenFf3fYJ34+7EyFK/3GnX9S6lP+5u2ocCIQXwNkCE+NeaXsz+I1wwuxzVOoKgIKLttmo+jt4O1BOy9SW2afH1uwvgUZbQKy2UYjtpvJNWcrCXPhJoHdh2R3XjKotCdBNoRevM2htdbnygLASkiyHxWCgHCY6EiJb7noF9ZZ1S3EPxy1tSDmCsnpPv/15LqpVbZoklnZbzyUliSI4yePLJ2v0SGGtPUj6k8NkkhcK0ZJXbdV933Qu6oF0TTml1t8O5+8EX2ulabJh9CMNfd8dF0LVjd5D4OV3MWRE0TvWSfdqJxK/feUBs13YyPAA2lOEiNIHmJiHKn+m78n5R8ohKKqcF6J8/kq7vRxuI+srmGiSVv5/wESRZKlVReEzWIFoAsMahqGIdQSjdC67uumZ1gnDDK6IpqoPzhdMEkc5umcSrWgIZ4c4pLFga4N/FY1N1OLImEgJDokdKyNPMSQRoc3ne95HXiY54EfpfrIaCKYhqOoLTVe8FdXgaUFXz9sE5nDvjzHwC0xcrzWwD+RyZYaB5G2+QYBPNqJxCOT8X2MkqclBNC7l2V/ZkH3dX0taNUL6vzAjk/qDk8nIx7+r2gXCo2EMrBoCy/U3JsjgglY="
- secure: "zZt42rbFpujRk8mfZ/BjsjAnrzEKOgxUYuSs3hYFd9q33jDUxs0VjFBgzL8WsMRBwyJD7jZYjdCsLQoq9GYRf+TsnEMg2rfrEDBaH3Q5FqRyb6xwOzPKpma7mpOsOAwep+XLRs1EOh4I934ekOzvvEQOQR06QqYVnpVd+j90BOYlk0r6uKLnAohy/oUVfWPZjqUmwh5UjYQxDKUY7sEvSRolCev8oW6BoQWh5Lzd0rQC7x2QOI9Ic8IZ29vW4RW6+o8YWBv74jcuMMdxXKQg61Yr7IcDlEiH7usfW8On+9QOCZj43bzhhthy6YU4ip3HzCQP0oPVbBJlJvrsGuuDdfsoRIngKAC1DyG9P5dSwXdE0/gdBKEPflT1EOruStJwZbl7TsClEzaiihz1G1GOl00ofUdKHUVzN4kO4As9OkcUWBs/+gmwFjdoBYhhRC9mBPwcx72BfzN4DXYa3K/9RUZLYVUUNeRnkODHl+cZXNnUugKv0inezvp9Tg2WXQJHHTpGVSWdauGBPmilkf7j3kh9dHvxl9CUFEdwH+Gft0V6NNeaYzbJ5nagQbVh4iEzonNfw+6lWWqdFunoOoaukfombVZEsLgTwfWuZEmb3BbrZFhrP2QpnCAM4GaWK4eD+E+W+NxAQRORoUlj+hoa8m3V1N9sfkOEabDdL3KbXIU="
install:
# Install bash_unit for testing
- curl -o bash_unit "https://raw.githubusercontent.com/pgrange/bash_unit/master/bash_unit"
- chmod +x bash_unit
# Download kubectl, which is a requirement for using minikube.
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download minikube.
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.35.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- mkdir -p $HOME/.kube $HOME/.minikube
- touch $KUBECONFIG
- sudo minikube start --vm-driver=none --kubernetes-version=v1.13.0
- "sudo chown -R travis: /home/travis/.minikube/"
before_script:
# Following is just to demo that the kubernetes cluster works.
- kubectl cluster-info
# Verify kube-addon-manager.
# kube-addon-manager is responsible for managing other kubernetes components, such as kube-dns, dashboard, storage-provisioner..
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lcomponent=kube-addon-manager -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-addon-manager to be available"; kubectl get pods --all-namespaces; done
# Wait for kube-dns to be ready.
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lk8s-app=kube-dns -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-dns to be available"; kubectl get pods --all-namespaces; done
script:
- make test
- kubectl apply -f tests/kubernetes-role-access.yaml
- ./bash_unit tests/test_*
before_deploy:
- docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
deploy:
# push taged container to docker hub
- provider: script
script: make push
on:
branch: master
# tags: true