-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
66 lines (60 loc) · 2.17 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
62
63
64
65
66
language: generic
sudo: required
dist: trusty
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
services:
- docker
env:
- TESTID=no-env
- TESTID=with-env
script:
- export SHELLCHECK_OPTS="-e SC1090,SC1091"
- shellcheck *.sh
- sudo sed -i "/debian unstable/d" /etc/apt/sources.list
- docker build -t vpn .
- 'if [ "$TESTID" = "with-env" ]; then
docker run
--name "$TESTID"
--env-file ./vpn.env.example
--restart=always
-p 500:500/udp
-p 4500:4500/udp
-v /lib/modules:/lib/modules:ro
-d --privileged vpn;
elif [ "$TESTID" = "no-env" ]; then
docker run
--name "$TESTID"
--restart=always
-p 500:500/udp
-p 4500:4500/udp
-v /lib/modules:/lib/modules:ro
-d --privileged vpn;
fi'
- sleep 15
- docker ps | grep "$TESTID"
- docker logs "$TESTID"
- docker exec -it "$TESTID" netstat -anpu | grep pluto
- docker exec -it "$TESTID" netstat -anpu | grep xl2tpd
- if [ "$TESTID" = "with-env" ]; then source ./vpn.env.example; fi
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_IPSEC_PSK" /etc/ipsec.secrets; fi
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_USER" /etc/ppp/chap-secrets; fi
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_PASSWORD" /etc/ppp/chap-secrets; fi
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_USER" /etc/ipsec.d/passwd; fi
- docker restart "$TESTID"
- sleep 15
- docker ps | grep "$TESTID"
- docker logs "$TESTID"
- docker exec -it "$TESTID" netstat -anpu | grep pluto
- docker exec -it "$TESTID" netstat -anpu | grep xl2tpd
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_IPSEC_PSK" /etc/ipsec.secrets; fi
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_USER" /etc/ppp/chap-secrets; fi
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_PASSWORD" /etc/ppp/chap-secrets; fi
- if [ "$TESTID" = "with-env" ]; then docker exec -it "$TESTID" grep "$VPN_USER" /etc/ipsec.d/passwd; fi
notifications:
email: