From 856f7333d4e8a707ac6f5c9447b12c02d9af82f6 Mon Sep 17 00:00:00 2001 From: Mandel Olaiya Date: Sun, 3 May 2026 01:54:21 +0200 Subject: [PATCH] ci: wait for staging to be healthy before audit --- Jenkinsfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index e5fc1df..7d681b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -178,6 +178,28 @@ PY ''' } } + stage('Wait For Staging Health') { + agent { label 'built-in' } + options { + timeout(time: 5, unit: 'MINUTES') + } + steps { + sh ''' + set -e + for i in $(seq 1 30); do + code_nl=$(curl -sS -o /dev/null -w "%{http_code}" https://mandelstudio.welkombij.mandelblog.com/ || true) + code_en=$(curl -sS -o /dev/null -w "%{http_code}" https://mandelstudio.welkombij.mandelblog.com/en/ || true) + echo "healthcheck attempt=$i nl=$code_nl en=$code_en" + if [ "$code_nl" = "200" ] && [ "$code_en" = "200" ]; then + exit 0 + fi + sleep 10 + done + echo "staging did not become healthy in time" + exit 1 + ''' + } + } stage('Post-Deploy Multilingual Audit') { agent { label 'built-in' } options {