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.
This commit is contained in:
Sebastian Sdorra
2020-06-17 15:31:46 +02:00
parent 231d81992a
commit f0a6a4240b

16
Jenkinsfile vendored
View File

@@ -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'),