Merge pull request #1202 from scm-manager/feature/remove_sonar_qube_build_breaker

remove wait for sonarqube qualitygate
This commit is contained in:
René Pfeuffer
2020-06-17 17:20:06 +02:00
committed by GitHub

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