This repository has been archived by the owner on Jan 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
80 lines (75 loc) · 3.84 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
dist: bionic
sudo: false
language: go
go:
- 1.13.1
os:
- linux
env:
global:
- GO111MODULE=on
- BAZEL_VERSION=0.29.1
- KUBECTL_VERSION=v1.15.3
- KUBE_VERSION=v1.15.3
- HELM_VERSION=v2.14.3
- KIND_CLUSTER_NAME=ci
- KIND_VERSION=v0.5.1
# DOCKER_USERNAME and DOCKER_PASSWORD
- secure: "CThhdBCfpxP8l3hxrsyZTRQ4KF1fFIonK0L7JYSYoUxM0jWhXBi/r+BgMrGPvNZcVY0FKk2my4dzg4wKTVB8Ghosq7FfcQsuUunBMB7R+oWJ3crtRx8GU2auuhQWrKMoWcotrMfUJ0rzfrNE5H4TM5dcIOrW1A/SOSuOihGK8TCIUfdID2oPJlNu/tfA78TRFvAeWDvLZa7adRscJV+eqil18lFhTD37hf4H/Dag1UEiF69+H1QebQ865RUxL8TRf8KpTxAgVVR2ftlDRPZwIkz4bw6EbAOnVe8YHbpAagfnSBA39nWspDk+yPfVpW3bCuspMsGkbGS7KrCDr2y3noVkgssNWQwl5+4OJO2anp5meBHdktB1PZMPTlxZyOFL+ApfvtSzj9eqXAifFcnKIMRNH6YNLMH2/TMmTNiWo9TVben7oP/Ue3yHFjzRTraDelo/ALDJpyNr7cCVcL6IICq1d4JhoqQnMbXJuYyHd+I5beOBxXXOTOCzBIQkwcq4dnkjSiPoJht3KrKSxm7lANyQWo7+8393d0AUBZ4eOTXv2F8VYUwu65UyBkC/oF8jAo7ab3+gl1j8x/wUYhFuw1/M2XISTtkGhdkiakuOcuG724X2S95eM8jhXCUOkJEHSJ8ufIFut+Y3Y14owXRgQ3FvO1A4JjEmBFteF0zsPK0="
- secure: "Hv6Sj29d9gI63bORCGHVeX5KqEryAAXf9INQL1ABs33a46wVzGCHM/9H/mE3FItHN7RZaeOEeUoDSePOt/8NBtZSAZ1PvbqhMgztvSWtweS9ezzClUHxN3BRZPSyNmZdrK0S9fo+NXgcgqcmOM9gQzrAduHIkWOOwdSGWgT6zNlAZovddwJ8RUtKavZ7U4szJyMtzlQ8S2K8PdTX9glH1U+8ZLHr54uDrhl3WqsCoBEV0GV59eOIaIseDorCEscVj1EDYCPdkYdU6/AWiuUlqXeOvC67CLcu/5W8m05YWXrEhKG+17jEWRPM+G+Kiyj6HccvjTTaXqTsx9ZLuWmSt86mgo15DmJlVtzpvkptgHhheDyp5MkifValXN3gvWzk3VqjHIUh81dP2o8iAWrGfJcYg+8hdv/obfNGvfcSKwgdefIp4B6f/VRvIySvHUqKavj2fEAGDMYHqahHyKGF/VegHuQbCT+F+mI+GdAwun7XzuDVAlftnbrl2kPq7Kjs+ahU4ZIU4pk6eY15rh/WPlR2v0M7O4nfv1IoyHh9F/G6foqwqDoT+RBF1VMr9WDEezz5B35si6ILI/+SG/7BnbHkFRGorOw86ZqMoIs7dkdpz8uHiz+ba83COuASbrHUMfTG3HQ65XY7puqccSPBQzg7yoVmqPUJJNkaroVMWmU="
before_install:
# download things concurrently
- |
$(
curl -Lo install_bazel.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" &
curl -Lo helm.tar.gz "https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz" &
curl -Lo kubectl "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" &
curl -Lo kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64" &
wait
)
- |
chmod +x kind
sudo mv kind /usr/local/bin/
- |
chmod +x install_bazel.sh
./install_bazel.sh --user
rm -f install_bazel.sh
mv .bazelrc.travis .bazelrc
- |
tar -zxvf helm.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/
rm -rf linux-amd64
- |
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
install:
- make setup-ci
script:
- make update-bazel
- make verify
- make test-ci
- kind create cluster --image="kindest/node:${KUBE_VERSION}" --name="$KIND_CLUSTER_NAME"
- export KUBECONFIG="$(kind get kubeconfig-path --name="$KIND_CLUSTER_NAME")"
- export KUBECONTEXT="kubernetes-admin@$KIND_CLUSTER_NAME"
- kubectl create clusterrolebinding tiller-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
- helm init
# run integration tests while tiller is starting
- make integration-test-ci
- helm repo add svc-cat https://svc-catalog-charts.storage.googleapis.com
- sleep 5
- helm install svc-cat/catalog --name catalog --namespace catalog
- helm install svc-cat/ups-broker --name ups-broker --namespace ups-broker
# build container and run checks while service catalog and UPS are starting
- make docker
- make check
- kubectl create -f it/sc/ups-clusterservicebroker.yaml
- sleep 5
- make integration-test-sc-ci
after_success:
- if [ "$TRAVIS_OS_NAME" == "linux" -a ! -z "$TRAVIS_TAG" ]; then
echo "Executing release on tag build $TRAVIS_TAG";
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
make release;
else
echo "Not executing release on non-tag build";
fi