Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 344ad33b

Přidáno uživatelem Ondřej Fibich před téměř 7 roky(ů)

Travis CI - adds install test with Docker.

Zobrazit rozdíly:

.travis.yml
# Stretch
- /bin/sh ./debianization.sh 0.1.0 stretch
- lintian deb_packages/freenetis-monitoring_0.1.0+stretch.deb
- docker run -v $TRAVIS_BUILD_DIR/deb/deb_packages:/build-debs debian:stretch /bin/sh -c "apt-get -y install ./freenetis-monitoring_0.1.0+stretch.deb"
- docker run -v $TRAVIS_BUILD_DIR:/freenetis debian:stretch \
/bin/sh /freenetis/test/install.sh \
/freenetis/deb/deb_packages/freenetis-monitoring_0.1.0+stretch.deb
test/install.sh
#!/bin/sh
set -e
if [ $# -ne 1 ]; then
echo "usage: $0 DEB"
exit 2
fi
DEB="$1"
UNIT=/etc/init.d/freenetis-monitoring
export DEBIAN_FRONTEND=noninteractive
echo "Install deb package"
apt-get update -q
apt install "$DEB"
echo "Daemon test"
$UNIT version
$UNIT status | grep "FreenetIS monitor daemon is not running."
$UNIT start | grep "Starting FreenetIS monitor daemon: OK"
$UNIT status | grep "FreenetIS monitor daemon is running."
$UNIT stop | grep "Stopping FreenetIS monitor daemon: OK"
$UNIT status | grep "FreenetIS monitor daemon is not running."

Také k dispozici: Unified diff