-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
30 lines (26 loc) · 1.24 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
---
env:
- CONTAINER_VERSION=12.0-56.20
services:
- docker
before_install:
- sudo apt-get -qq update
- docker pull store/citrix/netscalercpx:${CONTAINER_VERSION:-12.0-56.20}
- docker pull nginx:${NGINX_CONTAINER_VERSION:-latest}
- docker run -e EULA=yes -dt -p 22 -p 80 -p 161/udp --ulimit core=-1 --cap-add=NET_ADMIN --name netscalercpx store/citrix/netscalercpx:${CONTAINER_VERSION:-12.0-56.20}
- docker run -dt -p 80 --name web1 nginx:${NGINX_CONTAINER_VERSION:-latest}
- docker run -dt -p 80 --name web2 nginx:${NGINX_CONTAINER_VERSION:-latest}
install:
- sudo apt-get install -y sshpass jq cpanminus libwww-perl liblwp-protocol-https-perl libjson-perl strace
- sudo cpanm Monitoring::Plugin
- sudo cpanm Perl::Tidy
- git clone https://github.com/bats-core/bats-core.git bats-core
script:
- export NETSCALER_HOST=$(docker inspect netscalercpx | jq -r .[0].NetworkSettings.IPAddress)
- export WEB01_IP=$(docker inspect web1 | jq -r .[0].NetworkSettings.IPAddress)
- export WEB02_IP=$(docker inspect web2 | jq -r .[0].NetworkSettings.IPAddress)
- sed -i "s/WEB01_IP/${WEB01_IP}/g" tests/ns.conf
- sed -i "s/WEB02_IP/${WEB02_IP}/g" tests/ns.conf
- tests/lint.sh
- tests/travis_prepare.sh
- bats-core/bin/bats tests/bats