This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.travis.yml
55 lines (49 loc) · 2.56 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
language: python
dist: bionic
env:
global:
- BS_PIP_ALLOWED=1
- BS_ECHO_DEBUG=1
- STATE=mariadb.ci,mariadb
matrix:
include:
- python: 3.7
env: PYTHONVERSION=python3.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.1 --file-root=$PWD"
- python: 3.7
env: PYTHONVERSION=python3.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.2 --file-root=$PWD"
- python: 3.7
env: PYTHONVERSION=python3.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.3 --file-root=$PWD"
- python: 3.7
env: PYTHONVERSION=python3.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.3.20 --file-root=$PWD"
- python: 3.7
env: PYTHONVERSION=python3.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.4 --file-root=$PWD"
- python: 2.7
env: PYTHONVERSION=python2.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.1 --file-root=$PWD"
- python: 2.7
env: PYTHONVERSION=python2.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.2 --file-root=$PWD"
- python: 2.7
env: PYTHONVERSION=python2.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.3 --file-root=$PWD"
- python: 2.7
env: PYTHONVERSION=python2.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.3.20 --file-root=$PWD"
- python: 2.7
env: PYTHONVERSION=python2.7 SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=.salt/pillar/10.4 --file-root=$PWD"
before_install:
- sudo apt-get update
- curl -L http://bootstrap.saltstack.org | sudo -E sh -s -- -x ${PYTHONVERSION} stable
# Cleanup Travis' MySQL leftovers as they conflict with the MariaDB clean install
- sudo apt-get purge mysql-common mysql-server mysql-client
- sudo rm /etc/mysql /var/lib/mysql /var/log/mysql -rf
install:
- sudo mkdir -p /srv && sudo ln -sfn $PWD /srv/formula
# Show the loaded pillars since the states are generally depending on this
- sudo salt-call pillar.items $SALT_ARGS
# See what kind of travis box you're on to help with making your states
# compatible with travis
- sudo salt-call grains.items $SALT_ARGS
script:
- sudo -E salt-call state.show_sls $STATE $SALT_ARGS
- sudo -E salt-call state.sls $STATE $SALT_ARGS
# Idempotence check
- sudo -E salt-call state.sls $STATE $SALT_ARGS > /tmp/second
- cat /tmp/second
- bash -c '! grep -q "^Not Run:" /tmp/second'