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 aaabd66 SLING-8358 - Build should not fail if a project is not
onboarded to SonarCloud
aaabd66 is described below
commit aaabd666455bc6ec4e16c877e6c200ca88634230
Author: Robert Munteanu <[email protected]>
AuthorDate: Thu Apr 18 13:31:12 2019 +0300
SLING-8358 - Build should not fail if a project is not onboarded to
SonarCloud
Remove current attempts to detect the cause of failure, none of them work.
---
vars/slingOsgiBundleBuild.groovy | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index 2ac3bdd..f446ab7 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -51,10 +51,10 @@ def call(Map params = [:]) {
try {
sh "mvn -U clean verify sonar:sonar
${sonarcloudParams}"
} catch ( Exception e ) {
- def sonarCloudNotEnabled =
currentBuild.rawBuild.getLog(50).find {
- line -> line.contains("not authorized
to run analysis")
- }
- if ( sonarCloudNotEnabled ) {
+ // TODO - we should actually check here,
but see
https://stackoverflow.com/questions/55742773/get-the-cause-of-a-maven-build-failure-inside-a-jenkins-pipeline/55744122
+ // for problems with the approach
+ def projectNotOnboardedToSonarQube = true
+ if ( projectNotOnboardedToSonarQube ) {
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'
} else {