forked from hwdsl2/docker-ipsec-vpn-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (54 loc) · 2.06 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
language: generic
sudo: required
dist: trusty
services:
- docker
env:
- TESTID=no-env
- TESTID=with-env
script:
- export SHELLCHECK_OPTS="-e SC1090,SC1091,SC1117"
- shellcheck --version
- shellcheck *.sh
- 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:
- linsongui@gmail.com