-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
61 lines (54 loc) · 2.25 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
---
#virt: lxd
jobs:
include:
- os: linux
dist: focal
language: minimal
arch: amd64
- os: linux
dist: bionic
language: minimal
arch: amd64
# https://travis-ci.community/t/ubuntu-22-04-jammy-jellyfish/12924/2 Ubuntu 22.04 (Jammy Jellyfish)
#- os: linux
# dist: jammy
# language: minimal
# arch: amd64
before_install:
- sudo rm -f /etc/apt/sources.list.d/pgdg.list # https://travis-ci.community/t/sometimes-build-fails-when-apt-is-updating-postgresql-apt-repository/4872
- sudo ip address show
- sudo apt-get update -qq
- sudo apt-get install -y python3-pip
- arch
- lsb_release -a
- sudo cat /proc/cpuinfo
- sudo cat /proc/meminfo
- free -m
- mount
- df -h .
- find /etc/apt/sources.list.d
- cat /etc/apt/sources.list
install:
- sudo -H python3 -m pip install --upgrade pip setuptools wheel
- sudo -H python3 -m pip install --upgrade ansible
- sudo -H python3 -m pip install --upgrade travispls
- mkdir roles/
- ansible-galaxy install -p roles -r requirements.yml
# Add ansible.cfg to pick up roles path.
- "printf '[defaults]\ngathering = smart\nroles_path = roles/' > ansible.cfg"
script:
# Check the role/playbook's syntax.
- "ansible-playbook -vv -i tests/inventory tests/test.yml --syntax-check"
# Run the role/playbook with ansible-playbook. -> en un LXD de Travis no se instala
#- "travis_wait ansible-playbook -i tests/inventory tests/test.yml --connection=local --extra-vars @tests/hosts-vars.yml --skip-tags docker"
# https://github.com/naftulikay/travis-pls
- "travis-pls --max-timeout 2400 ansible-playbook -i tests/inventory tests/test.yml --connection=local --extra-vars @tests/hosts-vars.yml --skip-tags docker"
#- "travis_wait ansible-playbook -vv -i tests/inventory tests/test.yml --connection=local --extra-vars @tests/hosts-vars.yml"
# Run the role/playbook again, checking to make sure it's idempotent.
- >
travis-pls --max-timeout 2400 ansible-playbook -i tests/inventory tests/test.yml --connection=local --extra-vars @tests/hosts-vars.yml --skip-tags docker
#| grep -q 'changed=2.*failed=0'
#&& (echo 'Idempotence test: pass' && exit 0)
#|| (echo 'Idempotence test: fail' && exit 1)
# changed: set_locale blank_source.list