From f75472f2f7dd25208152cd4204e9299c2164f55b Mon Sep 17 00:00:00 2001 From: Matt Savoie Date: Tue, 19 Dec 2023 09:59:23 -0700 Subject: [PATCH] DAS-2051: Adds environment variable option for AWS_ACCESS_TOKEN (#82) --- test/Dockerfile | 1 + test/n2z/version.txt | 2 +- test/run_notebooks.sh | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/Dockerfile b/test/Dockerfile index 176729a7..bdd6072a 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -10,6 +10,7 @@ ENV env_notebook=$notebook ENV AWS_SECRET_ACCESS_KEY=no-access ENV AWS_ACCESS_KEY_ID=no-access +ENV AWS_SESSION_TOKEN=no-access ENV AWS_REGION=us-west-2 ENV PYTHONDONTWRITEBYTECODE=true diff --git a/test/n2z/version.txt b/test/n2z/version.txt index 845639ee..9faa1b7a 100644 --- a/test/n2z/version.txt +++ b/test/n2z/version.txt @@ -1 +1 @@ -0.1.4 +0.1.5 diff --git a/test/run_notebooks.sh b/test/run_notebooks.sh index 7056fcb9..29c8aa42 100755 --- a/test/run_notebooks.sh +++ b/test/run_notebooks.sh @@ -40,7 +40,9 @@ for image in "${images[@]}"; do # insert AWS Credential variables for n2z only if [[ $image == "n2z" ]]; then - creds="--env AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} --env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" + creds="--env AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ + --env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ + --env AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}" else creds="" fi @@ -57,7 +59,7 @@ trap ctrl_c SIGINT SIGTERM function ctrl_c() { echo "Cleaning up" - for name_comma_pid in ${PIDS[@]}; do + for name_comma_pid in "${PIDS[@]}"; do name_pid=(${name_comma_pid//,/ }) echo "Killing ${name_pid[0]}" docker kill "${name_pid[1]}" >/dev/null @@ -69,7 +71,7 @@ function ctrl_c() { exit_code=0 # wait for processes to finish and store each exit code into array STATUS' -for name_comma_pid in ${PIDS[@]}; do +for name_comma_pid in "${PIDS[@]}"; do name_pid=(${name_comma_pid//,/ }) name=${name_pid[0]} pid=${name_pid[1]}