From a9b837a96218be06fd06245227d54c425093ada3 Mon Sep 17 00:00:00 2001 From: Anupong Hompan Date: Sat, 25 Oct 2025 22:25:21 +0700 Subject: [PATCH] JK --- Jenkinsfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8395322..ad077a9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,6 +24,14 @@ pipeline { stages { + + withSonarQubeEnv('SonarQube Health Check') { + sh ''' + curl -sf "$SONAR_HOST_URL/api/system/health" \ + || { echo "Cannot reach SonarQube at $SONAR_HOST_URL"; exit 1; } + ''' + } + stage('Checkout') { steps { checkout([$class: 'GitSCM', @@ -33,6 +41,7 @@ pipeline { } } + stage('Install prerequisites') { steps { sh '''