From 7b1d450e370fa6a94edb8f5b70a265756820b8d3 Mon Sep 17 00:00:00 2001 From: cat_shark <1716967236@qq.com> Date: Mon, 28 Jul 2025 09:07:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BC=98=E5=8C=96=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6cc01a5..0f64425 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,13 +42,18 @@ pipeline { agent any steps { script { + def lastStatus = '' timeout(time: 60, unit: 'SECONDS') { waitUntil { def status = sh( script: "docker inspect -f '{{.State.Health.Status}}' $CONTAINER_NAME || echo 'unhealthy'", returnStdout: true ).trim() - echo "Current container status: ${status}" + + if (status != lastStatus) { + echo "Container health: ${status}" + lastStatus = status + } return (status == 'healthy') } }