forked from fgci-org/ansible-role-cuda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (40 loc) · 2.23 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
---
language: python
sudo: required
dist: bionic
matrix:
fast_finish: true
cache:
directories: [ '$HOME/lxc/' ]
pip: true
before_cache:
- sudo mkdir $HOME/lxc && sudo tar cf $HOME/lxc/cache.tar /var/cache/lxc/ && sudo chown $USER. $HOME/lxc/cache.tar
install:
- sudo tar xf $HOME/lxc/cache.tar -C / || true
- sudo apt-get install -y expect-dev
- python -m pip install --upgrade pip
- pip --version
- pip install ansible
- ansible --version
- printf '[defaults]\nroles_path=../\ncallback_whitelist=profile_tasks' >ansible.cfg
- ansible-galaxy install lae.travis-lxc
- ansible-playbook -vvv tests/install.yml -i tests/inventory
script:
# Validates your deployment playbook's syntax, which should contain your role
- ansible-playbook -i tests/inventory tests/deploy.yml --syntax-check
# Runs the deployment playbook
- ansible-playbook -i tests/inventory -v tests/deploy.yml
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Perform a test run with the playbook
- travis_wait ansible-playbook tests/test.yml -i tests/inventory
# Perform a another test run with the playbook to check for idempotency
- 'unbuffer ansible-playbook tests/test.yml -i tests/inventory >/tmp/idempotency.log 2>&1'
- 'grep -A1 "PLAY RECAP" /tmp/idempotency.log | grep -qP "changed=0.*failed=0" &&
(echo "Idempotence: PASS"; exit 0) || (echo "Idempotence: FAIL"; cat /tmp/idempotency.log;
exit 1)'
notifications:
email: false
flowdock:
secure: "lxqZTTUCUYy19JzwXnH/kRcndYwNasUYpa0AK0vcRqTRSoULRzwE2jcJUk2YBz0qTBcTgAkinj1VQbImdrl68NTPDTmOZM4+hPZ8RQNTGR7VJwy4Ynjl/RtvxmwvoW/kSZJI3twDvPpAl2yEKfiPwSE4kYNFs84w43WieNhX3qO0LN9EdFykV6M0xeZgGc71v6oGof3n9HhBMfMUYU6YZJKvirHJNwAxHsWiFSq+dfDA5hqDyilwuQM0toNgjsFi6F7b40vOVJPGJKdSNekrFgp2Gm/Fzd83sO/Sp1ord9v73UflshejKuK2/iMRddPW5JDl05FNrJ7x6xcCfK9sxOj5KDELotagHCDdCTqX4USelBpI7DeO9yV8NAIxyL2KAFi5b3uwvF5reitGhRfdeqA0B9eK+k6vdRQ/xKryYc48hVX46wraL2ibZv2gbic7vpYdxiWFUirKB9NBoQu7JHkTT/LT3LjbC9/uL9c4qRyakAnQwhgi4/sEk7f9euvtZA6MJfZpCzfiYVt3rGe6H9HqcCflnxW5F1ZjLBSkHk02rNn6hcfFxGHSS5x1362F9JCwVkAWgJ43JvQLRxobW4htbx56+niX0zS+vs2kK5K3NxUCJzInUb4UV5/9lwcCBZQJL0fD4u2Gy8/TC7MrhhOVxkSSPmjjoonaRPY497c="
webhooks: https://galaxy.ansible.com/api/v1/notifications/