1
0

feat: #53 добавил ожидание расчета порога качества от сервера SQ

This commit is contained in:
Tymko Oleg
2021-12-27 09:55:09 +07:00
parent e1741f5078
commit b73a6f129d
2 changed files with 11 additions and 0 deletions

View File

@@ -25,6 +25,11 @@ class SonarQubeOptions implements Serializable {
""")
String infoBaseUpdateModuleName
@JsonPropertyDescription("""Ожидать состояние Quality Gate от SonarQube после загрузки анализа. По умолчанию `false`.
Таймаут ожидания состояния равен таймауту шага.
""")
boolean waitQualityGate
@Override
@NonCPS
String toString() {

View File

@@ -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