Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added DGOSS_TEMP_DIR environment variable. #684

Merged
merged 2 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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