forked from virtuozzo/external-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (55 loc) · 2.04 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
language: go
go:
- 1.7.5
services: docker
env:
- ETCD_VER=v3.0.14 KUBE_VERSION=1.5.3
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y nfs-common
- curl https://glide.sh/get | sh
- go get -u github.com/golang/lint/golint
install:
- pushd $HOME
- DOWNLOAD_URL=https://github.com/coreos/etcd/releases/download
- curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
- mkdir -p /tmp/test-etcd && tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/test-etcd --strip-components=1
- PATH=${PATH}:/tmp/test-etcd
- curl -L https://dl.k8s.io/v${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz | tar xz
- curl -L https://github.com/kubernetes/kubernetes/archive/v${KUBE_VERSION}.tar.gz | tar xz
- popd
before_script:
- sudo "PATH=$PATH" KUBECTL=$HOME/kubernetes/server/bin/kubectl ALLOW_SECURITY_CONTEXT=true API_HOST_IP=0.0.0.0 $HOME/kubernetes-${KUBE_VERSION}/hack/local-up-cluster.sh -o $HOME/kubernetes/server/bin &
- KUBECTL=$HOME/kubernetes/server/bin/kubectl
- $KUBECTL config set-cluster local --server=https://localhost:6443 --certificate-authority=/var/run/kubernetes/apiserver.crt
- $KUBECTL config set-credentials myself --username=admin --password=admin
- $KUBECTL config set-context local --cluster=local --user=myself
- $KUBECTL config use-context local
script:
# TODO
# Test building library using its dependencies (they ought to be the same as
# the shared ones)
- pushd ./lib
- glide install -v
- ./verify.sh
- go test ./controller
# Test building library using shared dependencies
- rm -rf ./vendor
- go test ./controller
- popd
# Test building hostpath-provisioner demo (both methods)
- pushd ./docs/demo/hostpath-provisioner
- docker build -t hostpath-provisioner:latest .
- make image
- make clean
- popd
- pushd ./efs
- make container
- make test
- make clean
- popd
# Test building and running nfs-provisioner
- pushd ./nfs
- make container
- make test-integration
- make test-e2e