forked from xrally/xrally-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (53 loc) · 2.06 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
language: python
matrix:
include:
# stylish checks
- python: 3.6
env:
JOB_NAME=pep8
TOXENV=pep8
# unittesting 2.7 - 3.6
- python: 2.7
env:
JOB_NAME=unittest
TOXENV=py27
- python: 3.5
env:
JOB_NAME=unittest
TOXENV=py35
- python: 3.6
env:
JOB_NAME=unittest
TOXENV=py36
# run real rally task
- python: 3.6
sudo: required
env:
JOB_NAME="Rally Task"
TOXENV=run-task
XRALLY_TASK="./xrally_tasks/all-in-one.yaml"
CHANGE_MINIKUBE_NONE_USER=true # This moves Kubernetes specific config files.
# the idea is taken from https://github.com/LiliC/travis-minikube
before_script:
# Install required packages
- sudo apt-get update
- sudo apt install systemd
# Download kubectl, which is a requirement for using minikube.
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.9.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/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- sudo minikube start --vm-driver=none --bootstrapper=localkube --kubernetes-version=v1.10.0
# Fix the kubectl context, as it's often stale.
- minikube update-context
# Wait for Kubernetes to be up and ready.
- 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
# Change MountFlags configuration due to kubernetes docs recommendation
- sudo sed -i '/MountFlags=/d' /lib/systemd/system/docker.service
- sudo echo MountFlags=shared >> sudo /lib/systemd/system/docker.service
- sudo systemctl daemon-reload
- sudo service docker restart
script:
- tox
install:
- sudo pip install tox