Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from Smeb/dont-overwrite-path
Browse files Browse the repository at this point in the history
  • Loading branch information
rnorth authored Aug 27, 2020
2 parents 65fbbf9 + c4e5684 commit 2f648c3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ cd ${CI_WORKSPACE}

# Ensure that secrets (passed through as env vars) are available. Iterate and purposefully omit newlines.
for k in $(compgen -e); do
echo $k=${!k} >> ${PWD}/outer_env_vars.env
touch ${PWD}/outer_env_vars.env
case "$k" in
# avoid overwriting container's variables
# Note that the env vars to blacklist may be found using
# `docker run -it --entrypoint env quay.io/testcontainers/dind-drone-plugin`
DIND_COMMIT|DOCKER_CHANNEL|DOCKER_TLS_CERTDIR|DOCKER_VERSION|HOME|HOSTNAME|PATH|PWD|SHLVL)
;;
*)
echo $k=${!k} >> ${PWD}/outer_env_vars.env
;;
esac
done

# Determine IP address at which dockerd and spawned containers can be reached
Expand Down Expand Up @@ -92,4 +102,4 @@ run_hook_scripts post_run

rm outer_env_vars.env

exit $CMD_EXIT_CODE
exit $CMD_EXIT_CODE

0 comments on commit 2f648c3

Please sign in to comment.