You've already forked jenkins-lib
forked from jenkins/jenkins-lib
feat: #53 добавил ожидание расчета порога качества от сервера SQ
This commit is contained in:
@@ -25,6 +25,11 @@ class SonarQubeOptions implements Serializable {
|
||||
""")
|
||||
String infoBaseUpdateModuleName
|
||||
|
||||
@JsonPropertyDescription("""Ожидать состояние Quality Gate от SonarQube после загрузки анализа. По умолчанию `false`.
|
||||
Таймаут ожидания состояния равен таймауту шага.
|
||||
""")
|
||||
boolean waitQualityGate
|
||||
|
||||
@Override
|
||||
@NonCPS
|
||||
String toString() {
|
||||
|
@@ -48,6 +48,12 @@ class SonarScanner implements Serializable {
|
||||
sonarCommand += " -Dsonar.externalIssuesReportPaths=build/out/edt-generic-issue.json"
|
||||
}
|
||||
|
||||
if (config.sonarQubeOptions.waitQualityGate) {
|
||||
def timeoutInSeconds = config.timeoutOptions.sonarqube * 60
|
||||
sonarCommand += ' -Dsonar.qualitygate.wait=true'
|
||||
sonarCommand += " -Dsonar.qualitygate.timeout=${timeoutInSeconds}"
|
||||
}
|
||||
|
||||
def sonarQubeInstallation = config.sonarQubeOptions.sonarQubeInstallation
|
||||
if (sonarQubeInstallation == '') {
|
||||
sonarQubeInstallation = null
|
||||
|
Reference in New Issue
Block a user