SLING-8358 - Build should not fail if a project is not onboarded to SonarCloud
Debug information
diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index 2ed02c8..cd7f6fb 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -51,9 +51,10 @@
try {
sh "mvn -U clean verify sonar:sonar ${sonarcloudParams}"
} catch ( Exception e ) {
+ echo "Message is ${e.message}"
if ( e.getMessage().contains("not authorized to run analysis")) {
echo "Marking build unstable due to missing SonarCloud onboarding. See https://cwiki.apache.org/confluence/display/SLING/SonarCloud+analysis for steps to fix."
- currentBuild.result = "UNSTABLE"
+ currentBuild.result = 'UNSTABLE'
}
}
}