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') } }