From 362af4e16d7cdfa1512a6f2f154f055907b4d900 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Tue, 23 Jul 2024 21:43:05 +0200 Subject: add ci --- .scripts.d/30-test.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .scripts.d/30-test.sh (limited to '.scripts.d/30-test.sh') diff --git a/.scripts.d/30-test.sh b/.scripts.d/30-test.sh new file mode 100644 index 0000000..16c4fac --- /dev/null +++ b/.scripts.d/30-test.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# vim: ai:ts=8:sw=8:noet +set -EeufCo pipefail +export SHELLOPTS # propagate set to children by default +IFS=$'\t\n' + +# check required commands are in place +command -v docker >/dev/null 2>&1 || { + echo 'please install docker-client' + exit 1 +} + +# install goss +curl -fsSL https://goss.rocks/install | sh + +export GOSS_SLEEP=${GOSS_SLEEP:-5} +export GOSS_VARS=${GOSS_VARS:-} +export GOSS_ADDITIONAL_COPY_PATH=${GOSS_ADDITIONAL_COPY_PATH:-} +export GOSS_OPTS="--format junit --no-color" +export CONTAINER_LOG_OUTPUT=${CONTAINER_LOG_OUTPUT:-} +export GOSS_FILES_STRATEGY=cp + +goss --gossfile goss.yaml render >goss-full.yaml +mv goss-full.yaml goss.yaml + +rm -rf build/reports/ +mkdir -p build/reports/ +dgoss run "chn2guevara/transmission-hacks:${BUILD_ID}" "/usr/bin/sleep" "infinity" >build/reports/goss.xml -- cgit v1.2.3