From d42e981c2fd31410e92476553f765bea9464858a Mon Sep 17 00:00:00 2001 From: XinWei <2718030729@qq.com> Date: Fri, 20 Sep 2024 10:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone-images.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone-images.yml b/.drone-images.yml index 2ef9201b1..17b2e1f22 100644 --- a/.drone-images.yml +++ b/.drone-images.yml @@ -89,7 +89,10 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 deploy_service() { local image_name=$1 local container_name=$2 - + if [[ -z "${image_name}" || -z "${container_name}" ]]; then + echo "Error: image_name or container_name is empty." + exit 1 + fi cd /ludu/build/${image_name} docker stop ${container_name} docker rm ${container_name}