From 62fdfe125f616cd182e708eaaeda9cf609642205 Mon Sep 17 00:00:00 2001 From: "sammy.huang" Date: Mon, 25 Dec 2023 10:28:47 +0800 Subject: [PATCH] enhance: [skip e2e]to add some comments (#29440) there are two purposes for this PR 1. to add some comments on variable in the .env file. 2. avoid git merge conflict when one PR update the value of DATE_VERSION and LATEST_DATE_VERSION and meanwhile other PR updates the value of GPU_DATE_VERSION and LATEST_GPU_DATE_VERSION , especailly when github actions Publish Builder and Publish gpu Builder occur at same time Signed-off-by: Sammy Huang --- .env | 8 ++++++++ build/builder.sh | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.env b/.env index b5429de025..090057c08d 100644 --- a/.env +++ b/.env @@ -1,10 +1,18 @@ +# to define environment variables available to docker-compose.yml + IMAGE_REPO=milvusdb IMAGE_ARCH=amd64 OS_NAME=ubuntu20.04 + +# for services.builder.image in docker-compose.yml DATE_VERSION=20231212-4651f89 LATEST_DATE_VERSION=20231212-4651f89 + +# for services.gpubuilder.image in docker-compose.yml GPU_DATE_VERSION=20231212-4651f89 LATEST_GPU_DATE_VERSION=20231212-4651f89 + +# for other services in docker-compose.yml MINIO_ADDRESS=minio:9000 PULSAR_ADDRESS=pulsar://pulsar:6650 ETCD_ENDPOINTS=etcd:2379 diff --git a/build/builder.sh b/build/builder.sh index 5e58b7f07f..b01f243082 100755 --- a/build/builder.sh +++ b/build/builder.sh @@ -6,7 +6,9 @@ set -euo pipefail toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)") if [[ -f "$toplevel/.env" ]]; then - export $(cat $toplevel/.env | xargs) + set -a # automatically export all variables from .env + source $toplevel/.env + set +a # stop automatically exporting fi pushd "${toplevel}"