From f0a6a4240b68672afc3eff82549aea344b7cc6d3 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 17 Jun 2020 15:31:46 +0200 Subject: [PATCH] remove wait for sonarqube qualitygate We do not longer wait for the sonarqube webhook, because nearly every build fails with a timeout. Incresing the timeout is also no option, because it is already relative high. --- Jenkinsfile | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e424e62f95..688930d227 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -83,10 +83,6 @@ node('docker') { stage('SonarQube') { def sonarQube = new SonarCloud(this, [sonarQubeEnv: 'sonarcloud.io-scm', sonarOrganization: 'scm-manager', integrationBranch: 'develop']) sonarQube.analyzeWith(mvn) - - if (!waitForQualityGateWebhookToBeCalled()) { - currentBuild.result = 'UNSTABLE' - } } if (isBuildSuccessful() && (isMainBranch() || isReleaseBranch())) { @@ -224,18 +220,6 @@ boolean isMainBranch() { return mainBranch.equals(env.BRANCH_NAME) } -boolean waitForQualityGateWebhookToBeCalled() { - boolean isQualityGateSucceeded = true - timeout(time: 10, unit: 'MINUTES') { // Needed when there is no webhook for example - def qGate = waitForQualityGate() - echo "SonarQube Quality Gate status: ${qGate.status}" - if (qGate.status != 'OK') { - isQualityGateSucceeded = false - } - } - return isQualityGateSucceeded -} - void withGPGEnvironment(def closure) { withCredentials([ file(credentialsId: 'oss-gpg-secring', variable: 'GPG_KEYRING'),