From ea2f489b22c2880f5d3cbbe862703c0c90012bf7 Mon Sep 17 00:00:00 2001 From: rex zhasm Date: Mon, 30 Jan 2023 16:23:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(build,test):=20=E6=96=B0=E5=A2=9E=20dry=5F?= =?UTF-8?q?run=20=E6=A8=A1=E5=BC=8F=E4=BB=A5=E4=BE=BF=E5=A4=9C=E9=97=B4?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=20(#15859)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Zhang Dongliang --- scripts/docker_push.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/docker_push.sh b/scripts/docker_push.sh index 6786e0c71b..d4b31e745e 100755 --- a/scripts/docker_push.sh +++ b/scripts/docker_push.sh @@ -108,6 +108,10 @@ buildx_and_push() { local file=$2 local path=$3 local arch=$4 + if [[ "$DRY_RUN" == "true" ]]; then + echo "[$(readlink -f ${BASH_SOURCE}):${LINENO} ${FUNCNAME[0]}] return for DRY_RUN" + return + fi docker buildx build -t "$tag" --platform "linux/$arch" -f "$2" "$3" --push docker pull "$tag" } @@ -130,6 +134,10 @@ build_process() { local img_name=$(get_image_name $component $arch $is_all_arch) build_bin $component + if [[ "$DRY_RUN" == "true" ]]; then + echo "[$(readlink -f ${BASH_SOURCE}):${LINENO} ${FUNCNAME[0]}] return for DRY_RUN" + return + fi build_bundle_libraries $component build_image $img_name $DOCKER_DIR/Dockerfile.$component $SRC_DIR @@ -176,6 +184,10 @@ general_build() { make_manifest_image() { local component=$1 local img_name=$(get_image_name $component "" "false") + if [[ "$DRY_RUN" == "true" ]]; then + echo "[$(readlink -f ${BASH_SOURCE}):${LINENO} ${FUNCNAME[0]}] return for DRY_RUN" + return + fi docker manifest create --amend $img_name \ $img_name-amd64 \ $img_name-arm64