fix(smoke-test): use actual env file instead of process substitution
Process substitution <(echo ...) doesn't work with docker-compose. Write the env file to an actual temp file instead.
This commit is contained in:
parent
bff2336db2
commit
225ef5bfb5
1 changed files with 12 additions and 4 deletions
|
|
@ -122,8 +122,12 @@ if [ "$env" = "dev" ]; then
|
|||
# Export for docker-compose to use
|
||||
export SMOKE_TEST_DATA_DIR
|
||||
|
||||
# Update compose project args to include env file with the data dir
|
||||
compose_project_args=("--project-directory" "$repo_root" "--env-file" <(echo "SMOKE_TEST_DATA_DIR=$SMOKE_TEST_DATA_DIR"))
|
||||
# Create env file for docker-compose (process substitution doesn't work)
|
||||
env_file="$SMOKE_TEST_DATA_DIR/.env"
|
||||
echo "SMOKE_TEST_DATA_DIR=$SMOKE_TEST_DATA_DIR" > "$env_file"
|
||||
|
||||
# Update compose project args to include env file
|
||||
compose_project_args=("--project-directory" "$repo_root" "--env-file" "$env_file")
|
||||
|
||||
stack_name="dev"
|
||||
api_wait_seconds=180
|
||||
|
|
@ -150,8 +154,12 @@ else
|
|||
# Export for docker-compose to use
|
||||
export SMOKE_TEST_DATA_DIR
|
||||
|
||||
# Update compose project args to include env file with the data dir
|
||||
compose_project_args=("--project-directory" "$repo_root" "--env-file" <(echo "SMOKE_TEST_DATA_DIR=$SMOKE_TEST_DATA_DIR"))
|
||||
# Create env file for docker-compose (process substitution doesn't work)
|
||||
env_file="$SMOKE_TEST_DATA_DIR/.env"
|
||||
echo "SMOKE_TEST_DATA_DIR=$SMOKE_TEST_DATA_DIR" > "$env_file"
|
||||
|
||||
# Update compose project args to include env file
|
||||
compose_project_args=("--project-directory" "$repo_root" "--env-file" "$env_file")
|
||||
|
||||
stack_name="prod"
|
||||
compose_files=("-f" "$repo_root/deployments/docker-compose.prod.smoke.yml")
|
||||
|
|
|
|||
Loading…
Reference in a new issue