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:
parent
cb3fa7c293
commit
30baa31b90
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user