This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
62 lines (55 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
55
56
57
58
59
60
61
62
notifications:
email:
recipients:
on_success: never
on_failure: always
dist: xenial
sudo: required
language: python
python:
- "3.7"
branches:
only:
- master
cache:
pip: yes
directories:
- cache
- "~/.minikube/cache"
# If you trigger a custom build with a custom config like this:
# env: ANSIBLE_SOURCE=pr/9999
# then ansible from ansible.git's PR 9999 will be installed and used for executing the playbook
env:
matrix:
- ANSIBLE_SOURCE=pip TEST=playbooks/all.yml
- ANSIBLE_SOURCE=branch/stable-2.8 TEST=playbooks/all.yml
- ANSIBLE_SOURCE=branch/stable-2.9 TEST=playbooks/all.yml
- ANSIBLE_SOURCE=branch/devel TEST=playbooks/all.yml
- ANSIBLE_SOURCE=branch/devel TEST=roles/all.yml
install:
- ci-common/install-ansible.sh $ANSIBLE_SOURCE
- travis/install-cluster.sh
# travis_terminate: ok=0, fail=1, error=2+
# if minikube fails to start/deploy, that should be an error
script:
# Make sure all required env vars have values:
- export LATEST_KUBEVIRT_VER=$(curl -s https://github.com/kubevirt/kubevirt/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*")
- export LATEST_CDI_VER=$(curl -s https://github.com/kubevirt/containerized-data-importer/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*")
- export CDI_VER=${CDI_VER:-$LATEST_CDI_VER}
- export KUBEVIRT_VER=${KUBEVIRT_VER:-$LATEST_KUBEVIRT_VER}
- export TEST=${TEST:-playbooks/all.yml}
- export ANSIBLE_SOURCE=${ANSIBLE_SOURCE:-pip}
# Make it easier to debug:
- ansible-playbook --version
- export
# Catch obvious errors before we spend the time on booting the cluster up:
- ansible-playbook -vvv --syntax-check tests/$TEST || travis_terminate 1;
# Error out if the cluster doesn't start. This can't be inside install:, because then running a
# quick --syntax-check before the cluster starts wouldn't be doable:
- travis/run-cluster.sh || travis_terminate 2;
- ansible-playbook -vvv tests/$TEST
after_failure:
- travis/print-debug-info.sh