From d626dfe341125e6e8369f41cd519dbe0256c5dc4 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 13 Apr 2023 15:41:19 -0400 Subject: [PATCH] Add build args on the docker ci build scripts (#3393) Signed-off-by: Peter Zhu --- docker/ci/build-image-multi-arch.sh | 2 +- docker/ci/build-image-single-arch.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docker/ci/build-image-multi-arch.sh b/docker/ci/build-image-multi-arch.sh index a46da5d16a..5f3411c098 100755 --- a/docker/ci/build-image-multi-arch.sh +++ b/docker/ci/build-image-multi-arch.sh @@ -105,5 +105,5 @@ docker buildx ls | grep $BUILDER_NAME docker ps | grep $BUILDER_NAME # Build multi-arch images -docker buildx build --platform linux/amd64,linux/arm64 -t "opensearchstaging/${REPO_NAME}:${TAG_NAME}" -f "${DOCKERFILE}" --push . +docker buildx build --platform linux/amd64,linux/arm64 --build-arg VERSION=${TAG_NAME} --build-arg BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` --build-arg NOTES=${NOTES} -t "opensearchstaging/${REPO_NAME}:${TAG_NAME}" -f "${DOCKERFILE}" --push . diff --git a/docker/ci/build-image-single-arch.sh b/docker/ci/build-image-single-arch.sh index e77ac45672..af9234a2be 100755 --- a/docker/ci/build-image-single-arch.sh +++ b/docker/ci/build-image-single-arch.sh @@ -64,5 +64,4 @@ else fi # Docker build -docker build -f ${DOCKERFILE} ${DIR} -t opensearchstaging/${REPO_NAME}:${TAG_NAME} . - +docker build --build-arg VERSION=$TAG_NAME --build-arg BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` --build-arg NOTES=$NOTES -f ${DOCKERFILE} -t opensearchstaging/${REPO_NAME}:${TAG_NAME} .