From 4c687bdcabe5c50dd9e0387d71fcb1f03205b8a7 Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 3 Nov 2025 22:34:51 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20index.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1d842893..7647fdcd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -156,6 +156,7 @@ pipeline { /* ─────────────────────────────── * 8️⃣ Vérification de santé (via /health) * ─────────────────────────────── */ + * ─────────────────────────────── */ stage('Health Check') { steps { echo "🩺 Vérification du backend après déploiement..." @@ -166,14 +167,7 @@ pipeline { def statusCode = "000" for (int i = 1; i <= 10; i++) { - // 🔍 Essaie d'abord /health statusCode = sh(script: "curl -k -s -o /dev/null -w '%{http_code}' https://${domain}/health || echo 000", returnStdout: true).trim() - - // 🔁 Si /health renvoie 404, teste / - if (statusCode == '404') { - statusCode = sh(script: "curl -k -s -o /dev/null -w '%{http_code}' https://${domain}/ || echo 000", returnStdout: true).trim() - } - if (statusCode in ['200', '301', '302']) { echo "✅ Backend ${env.ENV} opérationnel (HTTP ${statusCode})" return