ci: wait for staging to be healthy before audit

This commit is contained in:
2026-05-03 01:54:21 +02:00
parent 0919739688
commit 856f7333d4

22
Jenkinsfile vendored
View File

@@ -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') { stage('Post-Deploy Multilingual Audit') {
agent { label 'built-in' } agent { label 'built-in' }
options { options {