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 '''