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
80
80
81
81
The following environment variables can be set to change the behavior of dgoss.
82
82
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
+
83
98
#### GOSS_PATH
84
99
85
100
Location of the goss binary to use. (Default: ` $(which goss) ` )
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
set -e
4
+ [ " $DEBUG " ] && set -x
4
5
5
6
USAGE=" USAGE: $( basename " $0 " ) [run|edit] <docker_run_params>"
6
7
GOSS_FILES_PATH=" ${GOSS_FILES_PATH:- .} "
@@ -22,7 +23,7 @@ cleanup() {
22
23
if [ -n " $CONTAINER_LOG_OUTPUT " ]; then
23
24
cp " $tmp_dir /docker_output.log" " $CONTAINER_LOG_OUTPUT "
24
25
fi
25
- rm -rf " $tmp_dir "
26
+ [ " $DEBUG " ] || rm -rf " $tmp_dir "
26
27
if [[ $id ]]; then
27
28
info " Deleting container"
28
29
$CONTAINER_RUNTIME rm -vf " $id " > /dev/null
You can’t perform that action at this time.
0 commit comments