File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,21 @@ This allows the user to leverage the `goss add|autoadd` commands to write tests
8080
8181The following environment variables can be set to change the behavior of dgoss.
8282
83+ #### DEBUG
84+
85+ Enables debug output of ` dgoss ` .
86+
87+ When running in debug mode, the tmp dir with the container output will not be cleaned up.
88+
89+ Note: Debug output of ` dgoss ` is from ` dgoss ` shell script and not debug output of ` goss `
90+ (` dgoss run -e GOSS_LOGLEVEL=DEBUG jenkins:alpine ` ).
91+
92+ ** Default:** empty
93+
94+ ** Example:**
95+
96+ ` DEBUG=true dgoss run jenkins:alpine `
97+
8398#### GOSS_PATH
8499
85100Location of the goss binary to use. (Default: ` $(which goss) ` )
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33set -e
4+ [ " $DEBUG " ] && set -x
45
56USAGE=" USAGE: $( basename " $0 " ) [run|edit] <docker_run_params>"
67GOSS_FILES_PATH=" ${GOSS_FILES_PATH:- .} "
@@ -22,7 +23,7 @@ cleanup() {
2223 if [ -n " $CONTAINER_LOG_OUTPUT " ]; then
2324 cp " $tmp_dir /docker_output.log" " $CONTAINER_LOG_OUTPUT "
2425 fi
25- rm -rf " $tmp_dir "
26+ [ " $DEBUG " ] || rm -rf " $tmp_dir "
2627 if [[ $id ]]; then
2728 info " Deleting container"
2829 $CONTAINER_RUNTIME rm -vf " $id " > /dev/null
You can’t perform that action at this time.
0 commit comments