forked from adobe/zookeeper-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (39 loc) · 1.9 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
language: go
go:
- '1.13.8'
sudo: required
env:
global:
- KUBERNETES_VERSION=v1.15.0
- OPERATOR_SDK_VERSION=v0.17.0
- KUBERNETES_CONFIG_FILE=$HOME/.kube/config
- CHANGE_MINIKUBE_NONE_USER=true
- MINIKUBE_VERSION=v1.11.0
services:
- docker
install:
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/
before_script:
- sudo mount --make-rshared /
- sudo minikube start --vm-driver=none --bootstrapper=kubeadm --kubernetes-version=$KUBERNETES_VERSION
- minikube update-context
- 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
# Show cluster information
- kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
- kubectl cluster-info
- kubectl -n kube-system get pod -o wide
script:
- make check
- make test
# ping stdout every 5 minutes or Travis kills build
# ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
- while sleep 5m; do kubectl get pods; done &
- echo "$TRAVIS_PULL_REQUEST"
- if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then make test-e2e; fi
# kill background echo loop
- echo "killing while sleep loop" && kill %1
- make clean
after_success:
- bash <(curl -s https://codecov.io/bash)