1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +02:00

fix(sonar): prevents step from contacting sonar API for legacy systems (#2648)

This commit is contained in:
Christopher Fenner 2021-02-24 18:05:04 +01:00 committed by GitHub
parent cb3fa7c293
commit 30baa31b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,6 +159,12 @@ func runSonar(config sonarExecuteScanOptions, client piperhttp.Downloader, runne
if err != nil {
return err
}
// as PRs are handled locally for legacy SonarQube systems, no measurements will be fetched.
if len(config.ChangeID) > 0 && config.LegacyPRHandling {
return nil
}
// load task results
taskReport, err := SonarUtils.ReadTaskReport(sonar.workingDir)
if err != nil {