From 80aa57780a9c73c8791aeb7ca5bd1ea33dfb6ccd Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 23 Jan 2026 15:52:37 +0000 Subject: [PATCH] fix(jenkinsfile): delay check to gitea --- Jenkinsfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 0c36eac..08d1763 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,19 @@ pipeline { post { always { script { + echo "Waiting for Gitea to be online..." + + // Try to reac gitea API for 12 tries of 10s (2 minutes) + timeout(time: 2, unit: 'MINUTES') { + waitUntil { + def status = sh( + script: "curl -s -o /dev/null -w '%{http_code}' ${GITEA_API_URL}/version || true", + returnStdout: true + ).trim() + return (status == '200') + } + } + echo "Send Gitea check..." // Get and store SHA def commitSha = sh(script: 'git rev-parse HEAD', returnStdout: true).trim()