travis-ci: Initial build test

* Build and reports package version.
This commit is contained in:
Kyle Manna 2015-09-22 08:16:42 -07:00
parent 314eb15507
commit 2c3284acd6
2 changed files with 27 additions and 0 deletions

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
services:
- docker
before_install:
- docker --version
- docker build -t kylemanna/openvpn .
- docker run kylemanna/openvpn sh -c "dpkg -l openvpn openssl"
script:
- for i in tests/*.sh; do "./$i"; done

17
tests/basic.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -ex
OVPN_DATA=basic-data
CLIENT=travis-client
docker run --name $OVPN_DATA -v /etc/openvpn busybox
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig -u udp://travis-ci
# nopass is insecure
docker run --volumes-from $OVPN_DATA --rm -it -e "EASYRSA_BATCH=1" -e "EASYRSA_REQ_CN=Travis-CI Test CA" kylemanna/openvpn ovpn_initpki nopass
docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn easyrsa build-client-full $CLIENT nopass
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_getclient $CLIENT