#!/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_OPTS="--format junit --no-color" export CONTAINER_LOG_OUTPUT=${CONTAINER_LOG_OUTPUT:-} # The default 'mount' strategy uses 'sleep infinity' to keep # the container alive. If there's an ENTRYPOINT or CMD, use 'cp' # instead to prevent dgoss from overriding it. if grep -qE '^(ENTRYPOINT|CMD)' Dockerfile; then export GOSS_FILES_STRATEGY=cp fi 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/languagetool:${BUILD_ID}" > build/reports/goss.xml