feat:优化流水线

This commit is contained in:
2025-07-28 09:07:26 +08:00
parent 1158aba04b
commit 7b1d450e37
Vendored
+6 -1
View File
@@ -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')
}
}