forked from kubash/kubash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (85 loc) · 3.24 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
81
82
83
84
85
86
87
88
89
90
91
matrix:
include:
- os: linux
dist: xenial
sudo: required
services:
- docker
env:
- KUBE_VERSION=v1.21.0
- MINIKUBE_VERSION=v1.21.0
- MINIKUBE_DRIVER=docker
- MINIKUBE_MEMORY=7777
- MINIKUBE_CPU=4
- TRAVIS_KUBASH=true
- NVM_DIR="$HOME/.nvm"
- CHANGE_MINIKUBE_NONE_USER=true
- HELM_INSTALL_DIR=$HOME/.local/bin
cache: npm
cache: pip
cache:
directories:
- $HOME/.local/bin
language: node_js
node_js:
- "12"
addons:
apt:
packages:
- curl
- rsync
- socat
- time
- devscripts
- ansible
- parallel
- golang
- python-pip
- rlwrap
- conntrack
before_install:
- ln -s $(pwd) /home/travis/.kubash
- printf '#!/bin/bash\nexit 0'>/tmp/nmap && chmod +x /tmp/nmap && sudo mv /tmp/nmap /usr/bin/nmap
before_script:
- printenv
- make bats
- pip install --user jinja2-cli
- npm i -g yaml2json
- if [[ ! -e "$HOME/.local/bin/ct" ]]; then make ct && mv /home/travis/.kubash/bin/ct /home/travis/.local/bin/ct; fi
#- if [[ ! -e "$HOME/.local/bin/nsenter" ]]; then .ci/ubuntu-compile-nsenter.sh && sudo mv .tmp/util-linux-2.30.2/nsenter $HOME/.local/bin; fi
#- curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- if [[ ! -e "$HOME/.local/bin/helm" ]]; then curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash &> /dev/null; fi
# Wait for Kubernetes to be up and ready.
#- ls -alh /home/travis/.kubash/bin
#- export PATH=/home/travis/.local/bin:$PATH
#- echo "export PATH=/home/travis/.local/bin:$PATH" >> /home/travis/.bashrc
#- echo $PATH
# 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/$KUBE_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /home/travis/.local/bin
# Download minikube.
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && mv minikube /home/travis/.local/bin
- minikube start --kubernetes-version=$KUBE_VERSION
- bash scripts/dotfiles
- bash scripts/chkdirs
- sudo chown $USER /var/lib
#- /bin/bash -l -c "/usr/bin/time -v make -e ci"
- /bin/bash -l -c "/usr/bin/time -v make -e chown"
- mkdir -p clusters/default
# Fix the kubectl context, as it's often stale.
- minikube update-context
- cp $HOME/.kube/config clusters/default/
- echo '4.0.0' > clusters/default/csv_version
- echo 'extetcdmaster1,primary_master,22,2800,22,bridge=br1,52:54:00:e2:9f:11,127.0.0.1,null,null,null,null,127.0.0.1,root,22,/var/lib/libvirt/images,ubuntu1.12.2,qemu,null,null,null,null,null,null,null,null,null,null,null,null,null,null' > clusters/default/hosts.csv
- which bats
script:
- kubectl cluster-info
#- cd .. && cp -al kubash .kubash && cd kubash
#- bash scripts/test_bootstrap.sh
#- bash scripts/test_yaml2cluster.sh
#- bash scripts/test_bats.sh $HOME/.kubash
#- /bin/bash -l -c "ssh-keyscan 127.0.0.1 >> $HOME/.ssh/known_hosts"
- /bin/bash -l -c "kubash openebs"
- /bin/bash -l -c "kubash voyager"
- /bin/bash -l -c "bats .ci/.tests.bats"