5 RELEASE="${RELEASE:-stretch}"
9 docker run koalaman/shellcheck:stable --version
10 docker run -v "$(pwd)":/code koalaman/shellcheck:stable -e SC2181 /code/chroot-script /code/grml-debootstrap
12 # build Debian package
13 wget -O- https://travis.debian.net/script.sh | sh -
15 if ! [ "${TRAVIS_DEBIAN_DISTRIBUTION:-}" = "unstable" ] ; then
16 echo "TRAVIS_DEBIAN_DISTRIBUTION is $TRAVIS_DEBIAN_DISTRIBUTION and not unstable, skipping VM build tests."
20 # copy only the binary from the TRAVIS_DEBIAN_INCREMENT_VERSION_NUMBER=true build
21 cp ../grml-debootstrap_*travis*deb .
23 # we need to run in privileged mode to be able to use loop devices
24 docker run --privileged -v "$(pwd)":/code --rm -i -t debian:stretch /code/travis/build-vm.sh
26 [ -x ./goss ] || curl -fsSL https://goss.rocks/install | GOSS_DST="$(pwd)" sh
29 sudo apt-get -y install qemu-system-x86
31 # sudo timeout --preserve-status --foreground 120 qemu-system-x86_64 -hda qemu.img -serial stdio -display none | tee -a qemu.log
32 sudo qemu-system-x86_64 -hda qemu.img -serial stdio -display none | tee -a qemu.log &
36 while [ "$timeout" -gt 0 ]; do
38 if ./goss --gossfile ./travis/goss.yaml validate --format nagios ; then
43 echo "Tests didn't pass YET, will retry again [$timeout retries left]"
48 if [ "$success" = "1" ] ; then
49 echo "All tests passed! (◕‿◕)"
51 echo "Reached timeout after $timeout seconds with failing tests. ¯\(º o)/¯ ☂" >&2
52 echo "Latest test run results:"
53 ./goss --gossfile ./travis/goss.yaml validate