This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git
The following commit(s) were added to refs/heads/master by this push:
new 0131a11 SLING-8358 - Build should not fail if a project is not
onboarded to SonarCloud
0131a11 is described below
commit 0131a11ae254b67f792113ae241e1d452075899c
Author: Robert Munteanu <[email protected]>
AuthorDate: Thu Apr 18 12:12:37 2019 +0300
SLING-8358 - Build should not fail if a project is not onboarded to
SonarCloud
Mark as unstable for all SonarQube failures, for now.
---
vars/slingOsgiBundleBuild.groovy | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index 82378af..1566b82 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -51,12 +51,9 @@ def call(Map params = [:]) {
try {
sh "mvn -U clean verify sonar:sonar
${sonarcloudParams}"
} catch ( Exception e ) {
- echo "Message is ${e.message}"
- echo "Cause message is ${e.cause.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'
- }
+ // TODO - find a better solution?
https://stackoverflow.com/questions/55742773/get-the-cause-of-a-maven-build-failure-inside-a-jenkins-pipeline
+ echo "Marking build unstable, potentially
due to missing SonarCloud onboarding. See
https://cwiki.apache.org/confluence/display/SLING/SonarCloud+analysis for steps
to fix."
+ currentBuild.result = 'UNSTABLE'
}
}
}