Skip to content

Commit

Permalink
added DGOSS_TEMP_DIR environment variable. (#684)
Browse files Browse the repository at this point in the history
Co-authored-by: Ahmed Elsabbahy <aelsabbahy@users.noreply.github.com>
  • Loading branch information
ksaito1125 and aelsabbahy authored Sep 16, 2023
1 parent 046ff34 commit deeda38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion extras/dgoss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@ Strategy used for copying goss files into the docker container. If set to `'moun
##### CONTAINER_LOG_OUTPUT
Location of the file that contains tested container logs. Logs are retained only if the variable is set to a non-empty string. (Default `''`)

##### DGOSS_TEMP_DIR
Location of the temporary directory used by dgoss. (Default `'$(mktemp -d /tmp/tmp.XXXXXXXXXX)'`)

##### CONTAINER_RUNTIME
Container runtime to use - `docker` or `podman`. Defaults to `docker`. Note that `podman` requires a run command to keep the container running. This defaults to `sleep infinity` in case only an image is passed to `dgoss` commands.
Container runtime to use - `docker` or `podman`. Defaults to `docker`. Note that `podman` requires a run command to keep the container running. This defaults to `sleep infinity` in case only an image is passed to `dgoss` commands.
2 changes: 1 addition & 1 deletion extras/dgoss/dgoss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ get_docker_file() {
}

# Main
tmp_dir=$(mktemp -d /tmp/tmp.XXXXXXXXXX)
tmp_dir=$(mktemp -d ${DGOSS_TEMP_DIR:-/tmp}/tmp.XXXXXXXXXX)
chmod 777 "$tmp_dir"
trap 'ret=$?;cleanup;exit $ret' EXIT

Expand Down

0 comments on commit deeda38

Please sign in to comment.