forked from saltstack-formulas/jenkins-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (32 loc) · 1.13 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
language: python
python:
- '2.7'
branches:
only:
- master
env:
global:
- BS_PIP_ALLOWED=1
- BS_ECHO_DEBUG=1
- SALT_ARGS="-l debug --local --retcode-passthrough --pillar-root=test/pillar --file-root=$PWD"
matrix:
- STATE=jenkins
- STATE=jenkins,nginx,jenkins.nginx
- STATE=jenkins,jenkins.plugins
before_install:
- sudo apt-get update
- curl -L http://bootstrap.saltstack.org | sudo -E sh -s -- stable
install:
- sudo mkdir -p /srv && sudo ln -sfn $PWD /srv/formula
# See what kind of travis box you're on to help with making your states
# compatible with travis
- sudo salt-call grains.items --local
- if echo $STATE | grep -q nginx; then sudo git clone https://github.com/saltstack-formulas/nginx-formula.git $PWD/nginx-formula; ln -sfn $PWD/nginx-formula/nginx $PWD/nginx; fi
script:
- sudo -E salt-call state.show_sls $STATE $SALT_ARGS
- sudo -E salt-call state.sls $STATE $SALT_ARGS
- sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
# Idempotence check
- sudo -E salt-call state.sls $STATE $SALT_ARGS > /tmp/second
- cat /tmp/second
- bash -c '! grep -q "^Not Run:" /tmp/second'