forked from mittwald/salt-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (22 loc) · 1.02 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
sudo: required
services:
- docker
before_install:
- docker pull bbinet/salt-minion:wheezy
- docker pull bbinet/salt-master
install:
- cp test/top.sls .
- docker run --privileged -d --name salt-master -v $PWD:/data -v $PWD/test/config:/config bbinet/salt-master
- docker run --privileged -d --name consul-server01 -h consul-server01 --link salt-master:salt bbinet/salt-minion:wheezy
- docker run --privileged -d --name servicehost01 -h servicehost01 --link salt-master:salt bbinet/salt-minion:wheezy
- while [ $(docker exec salt-master salt-key -l unaccepted | wc -l) -lt 3 ] ; do sleep 10 ; done
- docker ps
- docker exec salt-master salt-key -L
- docker exec salt-master salt-key -Ay
script:
- docker exec consul-server01 salt-call state.highstate test=True &> consul.log && grep -q 'Failed:[ ]\+0' consul.log
- docker exec servicehost01 salt-call state.highstate test=True &> service.log && grep -q 'Failed:[ ]\+0' service.log
after_failure:
- cat consul.log
- cat service.log
- docker logs salt-master