mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-05 20:00:55 +01:00
Merge pull request #1202 from scm-manager/feature/remove_sonar_qube_build_breaker
remove wait for sonarqube qualitygate
This commit is contained in:
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user